NumPyInputOutput#
- class pybrops.core.io.NumPyInputOutput.NumPyInputOutput[source]#
Bases:
object
Abstract class for defining
numpy.ndarray
input/output functionality.This abstract class defines two functions with the following purposes:
to_numpy
- export an object to anumpy.ndarray
.from_numpy
- load an object from anumpy.ndarray
.
Methods
Read an object from a
numpy.ndarray
.Export an object to a
numpy.ndarray
.- abstract classmethod from_numpy(arr, **kwargs)[source]#
Read an object from a
numpy.ndarray
.- Parameters:
arr (numpy.ndarray) – NumPy array from which to read.
kwargs (dict) – Additional keyword arguments to use for dictating importing from a
numpy.ndarray
.
- Returns:
out – An object read from a
numpy.ndarray
.- Return type: