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

Expand scico.numpy ufunc list #147

Closed
Michael-T-McCann opened this issue Dec 22, 2021 · 3 comments
Closed

Expand scico.numpy ufunc list #147

Michael-T-McCann opened this issue Dec 22, 2021 · 3 comments
Assignees
Labels
improvement Improvement of existing code, including addressing of omissions or inconsistencies

Comments

@Michael-T-McCann
Copy link
Contributor

Universal functions (ufuncs) are functions that are applied elementwise on arrays. These should be very easy to make work on BlockArrays, but currently only the following are supported in scico.numpy:

_ufunc_functions = [
("abs", jnp.abs),
jnp.maximum,
jnp.sign,
jnp.where,
jnp.true_divide,
jnp.floor_divide,
jnp.real,
jnp.imag,
jnp.conjugate,
jnp.angle,
jnp.exp,
jnp.sqrt,
jnp.log,
jnp.log10,
]

Eventually, we'd like to have every ufunc from numpy that is currently implemented in jax. (I think) this is only requires cross-checking these lists and adding to _ufunc_functions in numpy/__init__.py.

@bwohlberg bwohlberg added the enhancement New feature or request label Dec 23, 2021
@smajee smajee self-assigned this Dec 29, 2021
@bwohlberg bwohlberg added improvement Improvement of existing code, including addressing of omissions or inconsistencies and removed enhancement New feature or request labels Jan 11, 2022
@bwohlberg
Copy link
Collaborator

@Michael-T-McCann: Was this perhaps resolved in #259?

@Michael-T-McCann
Copy link
Contributor Author

@Michael-T-McCann: Was this perhaps resolved in #259?

#259 added significantly to this list. I don't think every possible (or even reasonable) jax.numpy function is wrapped, but most are.

@bwohlberg
Copy link
Collaborator

OK. Closing for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Improvement of existing code, including addressing of omissions or inconsistencies
Projects
None yet
Development

No branches or pull requests

3 participants