mpi_array.indexing.IndexingExtent¶
-
class
mpi_array.indexing.IndexingExtent(slice=None, start=None, stop=None, struct=None)[source]¶ Bases:
objectMethods
__init__([slice, start, stop, struct])Construct, must specify either sliceor both ofstartandstop.calc_intersection(other)Returns the indexing extent which is the intersection of this extent with the otherextent.calc_intersection_split(other)Returns (leftovers, intersection)pair, whereintersectionis theIndexingExtentobject (possiblyNone) indicating the intersection of this (self) extent with theotherextent andleftoversis a list ofIndexingExtentobjects indicating regions ofselfwhich do not intersect with theotherextent.create_struct_dtype_from_ndim(ndim)Creates a numpy.dtypestructure for holding start and stop indices.create_struct_instance(ndim)Creates a struct instance with numpy.dtypeself.struct_dtype_dict[ndim].get_struct_dtype(ndim)get_struct_dtype_from_ndim(ndim)split(a, index)Split this extent into two extents by cutting along axis aat indexindex.to_slice()Returns “ tupleofslice” equivalent of this indexing extent.to_tuple()Convert this instance to a tuplewhich can be passed to constructor (or used as adictkey).Attributes
STARTSTART_STRSTOPSTOP_STRIndexing bounds for a single tile of domain decomposition. ndimDimension of indexing. shapeSequence of intindicating the shape of this extent (including halo).startSequence of intindicating the per-axis start indices of this extent (including halo).stopSequence of intindicating the per-axis stop indices of this extent (including halo).struct_dtype_dict