Python package for splitting a
numpy.ndarray (or just an array shape)
into a number of sub-arrays.
The two main functions are:
- Similar to
numpy.array_split(), returns a list of sub-array views of the input
numpy.ndarray. Can split along multiple axes and has more splitting criteria (parameters) than
- Instead taking an
numpy.ndarrayas an argument, it takes the array shape and returns tuples of
sliceobjects which indicate the extents of the sub-arrays.
These two functions use an instance of the
which contains the bulk of the split implementation.
maintain state related to the computed split.
Splitting of multi-dimensional arrays can be performed according to several criteria:
Per-axis indices indicating the cut positions.
Per-axis number of sub-arrays.
Total number of sub-arrays (with optional per-axis number of sections constraints).
Specific sub-array shape.
Specification of halo (ghost) elements for sub-arrays.
Arbitrary start index for the shape to be partitioned.
Maximum number of bytes for a sub-array with constraints:
- sub-arrays are an even multiple of a specified sub-tile shape
- upper limit on the per-axis sub-array shape
The usage documentation is given in the Examples section.
Classes and Functions¶
||Splits the specified array
||Implements array shape splitting.|