cf.Partition.overlaps

Partition.overlaps(indices)[source]

Return True if the sub-array overlaps a subspace of the master array.

Parameters :
indices : sequence

Indices describing a subset of the master array. Each index is either a slice object or a list. If the sequence is empty then it is assumed that the master array is a scalar array.

Returns :
p_indices, shape : list, list or None, None

If the partition overlaps the indices then return a list of indices which will subset the partition’s data to where it overlaps the master indices and the subsetted partition’s shape as a list. Otherwise return None, None.

Examples

>>> indices = (slice(None), slice(5, 1, -2), [1, 3, 4, 8])
>>> p.overlaps(indices)
(slice(), ddfsfsd), [3, 5, 4]

Previous topic

cf.Partition.new_part

Next topic

cf.Partition.to_disk

This Page