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.
According to the Numpy doc we could try to add
__ufunc_array__methods to our data classes to automatically allow numpy ufuncs likenp.real,np.absand 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 thenp.ndarrayclass, also for arithmetics and so on.