dantro.data_loaders.load_numpy module

Defines a loader mixin to load numpy dumps

class dantro.data_loaders.load_numpy.NumpyLoaderMixin[source]

Bases: object

Supplies functionality to load numpy binary dumps into numpy objects

_load_numpy_binary(*args, **kwargs)

Loads the output of numpy.save back into a NumpyDataContainer.

Parameters
  • filepath (str) – Where the *.npy file is located

  • TargetCls (type) – The class constructor

  • **load_kwargs – Passed on to numpy.load, see there for kwargs

Returns

The reconstructed NumpyDataContainer

Return type

NumpyDataContainer

_load_numpy(*args, **kwargs)

Loads the output of numpy.save back into a NumpyDataContainer.

Parameters
  • filepath (str) – Where the *.npy file is located

  • TargetCls (type) – The class constructor

  • **load_kwargs – Passed on to numpy.load, see there for kwargs

Returns

The reconstructed NumpyDataContainer

Return type

NumpyDataContainer