NumPy NPZ backend¶
dsch backend for NumPy’s npz format.
This backend provides support for NumPy’s npz format. For details, see
numpy.savez(), numpy.load() and the corresponding NumPy
enhancement proposal.
-
class
dsch.backends.npz.Array(schema_node, parent, data_storage=None, new_params=None)¶ Bases:
dsch.data.Array,dsch.backends.npz._ItemNodeArray-type data node for the npz backend.
-
replace(new_value)¶ Completely replace the current node value.
Instead of changing parts of the data (e.g. via numpy array slicing), replace the entire data object for this node.
Parameters: new_value – New value to apply to the node, independent of the backend in use.
-
-
class
dsch.backends.npz.Bool(schema_node, parent, data_storage=None, new_params=None)¶ Bases:
dsch.backends.npz._ItemNodeBool-type data node for the npz backend.
-
replace(new_value)¶ Completely replace the current node value.
Instead of changing parts of the data (e.g. via numpy array slicing), replace the entire data object for this node.
Parameters: new_value – New value to apply to the node, independent of the backend in use.
-
-
class
dsch.backends.npz.Bytes(schema_node, parent, data_storage=None, new_params=None)¶ Bases:
dsch.backends.npz._ItemNodeBytes-type data node for the npz backend.
-
replace(new_value)¶ Completely replace the current node value.
Instead of changing parts of the data (e.g. via numpy array slicing), replace the entire data object for this node.
Parameters: new_value – New value to apply to the node, independent of the backend in use.
-
-
class
dsch.backends.npz.Compilation(schema_node, parent, data_storage=None, new_params=None)¶ Bases:
dsch.data.CompilationCompilation-type data node for the npz backend.
-
save()¶ Export the node data as a data storage object.
For
Compilation, data is represented as adictcontaining the sub-node names as keys and their respective data storage object as values.Returns: Data storage object with the node’s data. Return type: dict
-
-
class
dsch.backends.npz.Date(schema_node, parent, data_storage=None, new_params=None)¶ Bases:
dsch.data.Date,dsch.backends.npz._ItemNodeDate-type data node for the npz backend.
-
replace(new_value)¶ Completely replace the current node value.
Instead of changing parts of the data (e.g. via numpy array slicing), replace the entire data object for this node.
Parameters: new_value – New value to apply to the node, independent of the backend in use.
-
-
class
dsch.backends.npz.DateTime(schema_node, parent, data_storage=None, new_params=None)¶ Bases:
dsch.data.DateTime,dsch.backends.npz._ItemNodeDateTime-type data node for the npz backend.
-
replace(new_value)¶ Completely replace the current node value.
Instead of changing parts of the data (e.g. via numpy array slicing), replace the entire data object for this node.
Parameters: new_value – New value to apply to the node, independent of the backend in use.
-
-
class
dsch.backends.npz.List(schema_node, parent, data_storage=None, new_params=None)¶ Bases:
dsch.data.ListList-type data node for the npz backend.
-
class
dsch.backends.npz.Scalar(schema_node, parent, data_storage=None, new_params=None)¶ Bases:
dsch.data.Scalar,dsch.backends.npz._ItemNodeScalar-type data node for the npz backend.
-
replace(new_value)¶ Completely replace the current node value.
Instead of changing parts of the data (e.g. via numpy array slicing), replace the entire data object for this node.
Parameters: new_value – New value to apply to the node, independent of the backend in use.
-
-
class
dsch.backends.npz.Storage(storage_path, schema_node=None)¶ Bases:
dsch.storage.FileStorageInterface to
.npzfiles.Provides access to an
.npzfile via dsch, i.e. reading from and writing to such a file.Variables:
-
class
dsch.backends.npz.String(schema_node, parent, data_storage=None, new_params=None)¶ Bases:
dsch.backends.npz._ItemNodeString-type data node for the npz backend.
-
replace(new_value)¶ Completely replace the current node value.
Instead of changing parts of the data (e.g. via numpy array slicing), replace the entire data object for this node.
Parameters: new_value – New value to apply to the node, independent of the backend in use.
-
-
class
dsch.backends.npz.Time(schema_node, parent, data_storage=None, new_params=None)¶ Bases:
dsch.data.Time,dsch.backends.npz._ItemNodeTime-type data node for the npz backend.
-
replace(new_value)¶ Completely replace the current node value.
Instead of changing parts of the data (e.g. via numpy array slicing), replace the entire data object for this node.
Parameters: new_value – New value to apply to the node, independent of the backend in use.
-