-
Notifications
You must be signed in to change notification settings - Fork 70
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
Add best practices info to sphinx docs #1048
Add best practices info to sphinx docs #1048
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some typos and such, otherwise LGTM
General Recommendations | ||
----------------------- | ||
|
||
Following the basics of numpy as documented here is highly recommended. Here, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Following the basics of numpy as documented here is highly recommended. Here, | |
Following the basics of numpy as documented [here](https://numpy.org/doc/stable/user/basics.html) is highly recommended. Here, |
Co-authored-by: Manolis Papadakis <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly nits. Looks good to me
|
||
|
||
In the example below, the function ``transform`` is defined to operate on | ||
calars. But it can also be used on an array to linearly transform its elements, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: this should be scalars and not calars
|
||
When the array needs to be updated from another array based on a condition | ||
that they both satisfy, use ``putmask`` for better performance. Unlike the | ||
previous example, here x is set to twice the value of y when the condition |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: should we say x
instead of x and similarly for y?
x[np.logical_and(first_cond, second_cond)] = const | ||
|
||
|
||
Refer to the documentation for other logical operations. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we link documentation to this?
https://numpy.org/doc/stable/reference/routines.logic.html#logical-operations
This PR adds the "Best Practices" doc authored by @shriram-jagan to the deployed docs User Guide.