Skip to content

provide better docstrings for ufuncs #700

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

Closed
gdementen opened this issue Sep 24, 2018 · 3 comments
Closed

provide better docstrings for ufuncs #700

gdementen opened this issue Sep 24, 2018 · 3 comments

Comments

@gdementen
Copy link
Contributor

The numpy examples in the ufuncs doc (floor, ceil, trunc, sqrt, ...) are confusing our users.

round does not have any example either.

@alixdamman
Copy link
Collaborator

What do you suggest?
To add a warning at the beginning of the documentation like xarray does (see http://xarray.pydata.org/en/stable/generated/xarray.ufuncs.angle.html#xarray.ufuncs.angle for examples) or to write our own documentation and examples for each ufunc?

@gdementen
Copy link
Contributor Author

gdementen commented Nov 21, 2018

Writing our own doc for all ufuncs would take too much time at this point. We could have an hybrid approach: write our own doc for the few ufuncs which are very important to our users and add a warning like xarray for the others. I consider the following ufuncs very important:

  • where, minimum, maximum -- those needs to be both documented and have specific examples because broadcasting by axes names makes them more user-friendly than their numpy version.
  • round, floor, ceil, trunc, isnan, isinf, sqrt, log, exp, inverse -- at least those need to appear in the API doc and ideally have our own examples.
  • interp -- should appear in the API doc if it actually works with LArrays, which I have never tested (and I doubt is the case). Might be worth having specific documentation if it works well. My guess is that we should rather make a new LArray method for that one.
  • all other ufuncs should have the numpy doc with a warning.

@alixdamman
Copy link
Collaborator

* round, floor, ceil, trunc, isnan, isinf, sqrt, log, exp, inverse -- at least those need to appear in the API doc and ideally have our own examples.

created new issue #715

* interp -- should appear in the API doc **if** it actually works with LArrays, which I have never tested (and I doubt is the case). Might be worth having specific documentation if it works well. My guess is that we should rather make a new LArray method for that one.

created new issue #716

alixdamman added a commit to alixdamman/larray that referenced this issue Nov 26, 2018
…ufuncs.py modules + added explicit doc and examples for ufuncs where, maximum and minimum
alixdamman added a commit to alixdamman/larray that referenced this issue Nov 27, 2018
…ufuncs.py modules + added explicit doc and examples for ufuncs where, maximum and minimum
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants