-
Notifications
You must be signed in to change notification settings - Fork 2
27 arithmetic operations for parameters #43
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
Merged
damskii9992
merged 72 commits into
develop
from
27-Arithmetic-operations-for-Parameters
Aug 14, 2024
Merged
27 arithmetic operations for parameters #43
damskii9992
merged 72 commits into
develop
from
27-Arithmetic-operations-for-Parameters
Aug 14, 2024
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Apart from code review, a few things I found while testing
3+3+p -> "6+p"
p+3+3 -> "p+3+3" Nan/inf treatment. Are the >>> p
<Parameter 'a': 1.0000, bounds=[-inf:inf]>
>>> p+np.inf
<Parameter 'a + inf': inf, bounds=[nan:inf]>
>>> p+np.nan
<Parameter 'a + nan': nan, bounds=[nan:nan]>
>>> a1
<Parameter 'a1': 2.0000 km, bounds=[-inf:inf]>
>>> a3
<Parameter 'a3': 2.0000 nm, bounds=[-inf:inf]>
>>> a1/a3
<Parameter 'a1 / a3': 1000000000000.0000, bounds=[-inf:inf]>
>>> a3/a1
scipp._scipp.core.UnitError: Conversion from `10e-13` to `2.18154854429043519e+244*s^(-13)*A^(-13)` is not valid. |
…hub.com/EasyScience/EasyScience into 27-Arithmetic-operations-for-Parameters
Should probably be |
…hub.com/EasyScience/EasyScience into 27-Arithmetic-operations-for-Parameters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.