Bases: object
A partition of a partition matrix.
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'))
_original | |
_save | |
dimensions | |
directions | |
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. |
location | |
on_disk | True if and only if the partition’s sub-array is on disk as opposed to in memory. |
part | |
shape | |
size | Number of elements in the partition’s data array. |
subarray |
change_dimension_names | asdasdasdasds |
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. |
flat | Return an iterator that yields the partition itself. |
iterarray_indices | Return an iterator over indices of the partition’s data array. |
itermaster_indices | Return an iterator over indices of the master array which are spanned by the conformed array. |
new_part | Return the part attribute updated for new indices of the master array. |
to_disk | Store the partition’s sub-array in a temporary file on disk in place. |
update_from | Completely update the partition with another partition’s attributes in place. |