syncopy
syncopy copied to clipboard
Numpy ufunc and Syncopy data object
According to the Numpy doc we could try to add __ufunc_array__
methods to our data classes to automatically allow numpy ufuncs like np.real
, np.abs
and so on to work with Syncopy data objects. For basic operations where one operation is applied to every element of a dataset, this could be worthwhile exploring.
Eventually this could turn out to be really powerful, as basically Syncopy data objects which implement __ufunc_array__
then would act like the np.ndarray
class, also for arithmetics and so on.