cfdm.RaggedArray¶
- class cfdm.RaggedArray(*args, **kwargs)[source]¶
Bases:
CompressedArrayAn underlying ragged array.
See CF section 9 “Discrete Sampling Geometries”
Added in version (cfdm): 1.10.0.0
Initialisation
- Parameters:
- compressed_array: array_like
The compressed data.
- shape:
tuple The shape of the uncompressed array.
- compressed_dimensions:
dict Mapping of dimensions of the compressed array to their corresponding dimensions in the uncompressed array. Compressed array dimensions that are not compressed must be omitted from the mapping.
- Parameter example:
{0: (0, 1)}- Parameter example:
{0: (0, 1, 2)}
- count_variable:
Count, optional A count variable for uncompressing the data, corresponding to a CF-netCDF count variable, if required by the decompression method.
- index_variable:
Index, optional An index variable for uncompressing the data, corresponding to a CF-netCDF count variable, if required by the decompression method.
- source: optional
Convert source, which can be any type of object, to a
RaggedArrayinstance.All other parameters, apart from copy, are ignored and their values are instead inferred from source by assuming that it has the
RaggedArrayAPI. Any parameters that can not be retrieved from source in this way are assumed to have their default value.Note that if
xis also aRaggedArrayinstance thencfdm.RaggedArray(source=x)is equivalent tox.copy().- copy:
bool, optional If True (the default) then deep copy the input parameters prior to initialisation. By default the parameters are not deep copied.
Methods¶
Methods
The |
|
Returns a numpy array containing the uncompressed data. |
|
Cast the data to a specified type. |
|
Returns an independent numpy array with the compressed data. |
|
Mapping of compressed to uncompressed dimensions. |
|
The data as required by the decompression algorithm. |
|
Return a deep copy of the array. |
|
Data-type of the uncompressed data. |
|
Return the Subarray class. |
|
The attributes of the array. |
|
The calendar of the array. |
|
Return axes that are compressed in the underlying array. |
|
Returns the compressed dimension's position in the array. |
|
Returns the array's compression type. |
|
Return the count variable for the compressed array. |
|
Return the name of the file containing the compressed data. |
|
Return the index variable for the compressed array. |
|
The units of the array. |
|
Number of array dimensions. |
|
Shape of the uncompressed data. |
|
Number of elements in the array. |
|
Return the underlying array object. |
|
Non-data parameters required by the |
|
Create the subarray shapes along each uncompressed dimension. |
|
Return descriptors for every subarray. |
|
Bring data on disk into memory. |