Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Numpy ufunc and Syncopy data object #376

Open
tensionhead opened this issue Nov 11, 2022 · 1 comment
Open

Numpy ufunc and Syncopy data object #376

tensionhead opened this issue Nov 11, 2022 · 1 comment
Labels
Explore Examine novel functionality/proposed changes etc. Does not necessarily involve coding things.

Comments

@tensionhead
Copy link
Contributor

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 tensionhead added the Explore Examine novel functionality/proposed changes etc. Does not necessarily involve coding things. label Nov 11, 2022
@tensionhead
Copy link
Contributor Author

Here is some more documentation from the numpy folks: https://numpy.org/neps/nep-0013-ufunc-overrides.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Explore Examine novel functionality/proposed changes etc. Does not necessarily involve coding things.
Projects
None yet
Development

No branches or pull requests

1 participant