Bases: cf.utils.CfList
A partition matrix.
Initialization
Parameters : |
|
---|
Examples
>>> pm = PartitionMatrix(
... [Partition(location = [(0, n) for n in shape],
... shape = shape[:],
... dimensions = dimensions[:],
... directions = copy(directions),
... Units = units.copy(),
... part = [],
... data = data)
... ],
... dimensions = [])
ndim | The number of partition dimensions in the partition matrix. |
shape | List of the partition matrix’s dimension sizes. |
size | The number of partitions in the partition matrix. |
Undocumented methods behave exactly as their counterparts in a built-in list.
add_partitions | |
append | |
change_dimension_names | dim_name_map should be a dictionary which maps each dimension names in |
copy | Return a deep copy. |
count | Return the number of occurrences of a given value. |
equals | True if two instances are equal, False otherwise. |
expand_dims | Insert a new size 1 partition dimension in place. |
extend | |
flat | Return a flat iterator over the partitions in the partition matrix. |
index | Return the first index of a given value. |
info | |
insert | Insert an object before the given index in place. |
partition_boundaries | |
pop | |
ravel | Return a flattened partition matrix as a built-in list. |
remove | |
reverse | |
rollaxis | Roll the specified partition dimension backwards,in place until it lies in a given position. |
set_location_map | Recalculate the cf.Partition.location attribute of each partition in |
squeeze | Remove all size 1 partition dimensions in place. |
transpose | Permute the partition dimensions of the partition matrix in place. |