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
Clean up function bindings #2480
Conversation
docs/reference/free-functions.rst
Outdated
@@ -59,6 +60,7 @@ Math | |||
round | |||
sqrt | |||
subtract | |||
unary_minus |
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.
Numpy calls this differently? https://numpy.org/doc/stable/reference/generated/numpy.negative.html
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.
That's why I didn't find it! Renaming...
src/scipp/core/logical.py
Outdated
"""Element-wise logical negation. | ||
|
||
Equivalent to | ||
|
||
.. code-block:: python | ||
|
||
~a | ||
|
||
:param x: Input data. | ||
:return: The logical inverse of `x`. | ||
""" |
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.
Remember that we can use a new docstring style! But we may also want to leave this here and try to auto-convert all of them at once.
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.
Ah right, this was largely copy-pasted. I am going to change it, there is no reason to merge it like this.
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.
Done. I tried pyment but it struggles with type hints like Union
, example sections, and see also sections. I ended up doing it with a few search and replace operations...
3ce9e3a
to
fe34449
Compare
Fixes a number of issues with the bindings and adds more tests. I think we have coverage of all exposed functions now.
Also removes some unused bindings.