Bases: object
A partition of a master data array.
The partition spans all or part of exactly one sub-array of the master data array
Initialization
Parameters : |
|
---|
Examples
>>> p = Partition(subarray = numpy.arange(20).reshape(2,5,1),
... _directions = {'dim0', True, 'dim1': False, 'dim2': True},
... location = [(0, 6), (1, 3), (4, 5)],
... _dimensions = ['dim1', 'dim0', 'dim2'],
... part = [],
... Units = cf.Units('K'))
>>> p = Partition(subarray = numpy.arange(20).reshape(2,5,1),
... _directions = {'dim0', True, 'dim1': False, 'dim2': True},
... location = [(0, 6), (1, 3), (4, 5)],
... _dimensions = ['dim1', 'dim0', 'dim2'],
... shape = [5, 2, 1],
... part = [slice(None, None, -1), [0,1,3,4], slice(None)],
... Units = cf.Units('K'))
>>> p = Partition(subarray = numpy.array(4),
... _directions = True,
... location = [(4, 5)],
... _dimensions = ['dim1'],
... part = [],
... Units = cf.Units('K'))
in_memory | True if and only if the partition’s sub-array is in memory as opposed to on disk. |
indices | The indices of the master array which correspond to this partition’s data array. |
isscalar | True if and only if the partition’s data array and sub-array are both a scalar arrays. |
on_disk | True if and only if the partition’s sub-array is on disk as opposed to in memory. |
change_axis_names | Change the axis names. |
close | Close the partition after it has been conformed. |
copy | Return a deep copy. |
dataarray | Returns the partition’s data array. |
file_close | Close all file containing the sub-array, if there is one. |
is_partition | Completely update the partition with another partition’s attributes in place. |
master_ndindex | Return an iterator over indices of the master array which are spanned by the conformed array. |
ndindex | Return an iterator over the N-dimensional indices of the partition’s |
new_part | Update the part attribute in-place. |
overlaps | Return True if the sub-array overlaps a subspace of the master array. |
to_disk | Store the partition’s sub-array in a temporary file on disk in place. |
update_inplace_from | Completely update the partition with another partition’s attributes in place. |