The array_split.split Module

Defines array splitting functions and classes.

Classes and Functions

shape_factors(n[, dim]) Returns a numpy.ndarray of factors f such that (len(f) == dim) and (numpy.product(f) == n).
calculate_num_slices_per_axis(...[, ...]) Returns a numpy.ndarray (return_array say) where non-positive elements of
calculate_tile_shape_for_max_bytes(...[, ...]) Returns a tile shape tile_shape such that numpy.product(tile_shape)*numpy.sum(array_itemsize) <= max_tile_bytes.
convert_halo_to_array_form(halo, ndim) Converts the halo argument to a (ndim, 2) shaped array.
ShapeSplitter(array_shape[, ...]) Implements array shape splitting.
shape_split(array_shape, *args, **kwargs) Splits specified array_shape in tiles, returns array of slice tuples.
array_split(ary[, indices_or_sections, ...]) Splits the specified array ary into sub-arrays, returns list of numpy.ndarray.


array_split.split.ARRAY_BOUNDS = <property object>

Indicates that tiles are always within the array bounds, resulting in tiles which have truncated halos. See The halo parameter examples.

array_split.split.NO_BOUNDS = <property object>

Indicates that tiles may have halos which extend beyond the array bounds. See The halo parameter examples.