sleepless.data.sample#
Base definition of sample.
Classes
|
Representation of sample that can be loaded via a callable. |
|
Representation of sample that is sufficient for the blocks in this module. |
- class sleepless.data.sample.DelayedSample(load, parent=None, **kwargs)[source]#
Bases:
object
Representation of sample that can be loaded via a callable.
The optional
**kwargs
argument allows you to attach more attributes to this sample instance.- Parameters:
load (object) – A python function that can be called parameterlessly, to load the sample in question from whatever medium
parent (
DelayedSample
,Sample
, None) – If passed, consider this as a parent of this sample, to copy informationkwargs (dict) – Further attributes of this sample, to be stored and eventually transmitted to transformed versions of the sample
- property data#
Loads the data from the disk file.