syncopy.datatype.base_data.FauxTrial#
- class syncopy.datatype.base_data.FauxTrial(shape, idx, dtype, dimord)[source]#
Stand-in mockup of NumPy arrays representing trial data
- Parameters:
shape (tuple) – Shape of source trial array
idx (tuple) – Tuple of slices for extracting trial-data from source object’s data dataset. The provided tuple has to be a proper indexing sequence, i.e., if idx refers to the k-th trial in obj, then
obj.data[idx]
must slice data correctly so thatobj.data[idx] == obj.trials[k]
dtype (
numpy.dtype
) – Datatype of source trial arraydimord (list) – Dimensional order of source trial array
- Returns:
faux_trl – An instance of FauxTrial that essentially parrots
numpy.ndarray
objects and can, thus, be used to feed “fake” trials into acomputeFunction()
to get the noCompute runs out of the way w/o actually loading trials into memory.- Return type:
FauxTrial object
See also
syncopy.continuous_data.ContinuousData._preview_trial
makes use of this class
Methods
__init__
(shape, idx, dtype, dimord)squeeze
()Remove 1's from shape and return a new FauxTrial instance (parroting the NumPy original
numpy.squeeze()
)Attributes
Return a new FauxTrial instance with reversed dimensions (parroting the NumPy original
numpy.transpose()
)- squeeze()[source]#
Remove 1’s from shape and return a new FauxTrial instance (parroting the NumPy original
numpy.squeeze()
)
- property T#
Return a new FauxTrial instance with reversed dimensions (parroting the NumPy original
numpy.transpose()
)