scistag.filestag.bundlers.numpy_bundler.NumpyBundler¶
- class NumpyBundler[source]¶
Bases:
objectBundles and unpacks numpy data, see
BundleMethods
Bundled a numpy array to a bytes stream
Unpacks the data
Attributes
__dict____doc____module____weakref__list of weak references to the object (if defined)
- classmethod bundle(data, options=None)[source]¶
Bundled a numpy array to a bytes stream
- Parameters
data (np.ndarray) – The data to be packed
options (BundlingOptions | None) – The bundling options
- Return type
- Returns
The packed data as single bytes strings
- static unpack(data, options=None)[source]¶
Unpacks the data
- Parameters
data (bytes) – The data to be unpacked
options (UnpackOptions | None) – The unpacking options
- Return type
np.ndarray
- Returns
The restored numpy array