syncopy icon indicating copy to clipboard operation
syncopy copied to clipboard

Numpy ufunc and Syncopy data object

Open tensionhead opened this issue 2 years ago • 1 comments

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.

tensionhead avatar Nov 11 '22 14:11 tensionhead