-
Notifications
You must be signed in to change notification settings - Fork 5
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
Ops with scalars and vectors #82
Conversation
@lewisjared making this work with pint will require some thinking so let's release 0.6.2 without it and add later |
7cae62e
to
5060ce4
Compare
Codecov Report
@@ Coverage Diff @@
## master #82 +/- ##
==========================================
+ Coverage 94.72% 94.89% +0.17%
==========================================
Files 15 15
Lines 1648 1665 +17
Branches 362 366 +4
==========================================
+ Hits 1561 1580 +19
+ Misses 59 58 -1
+ Partials 28 27 -1
Continue to review full report at Codecov.
|
Alright @lewisjared turns out this was easier than I thought. Can you take a look? Not sure how to better document the Pint support...? |
Also it turns out xarray has a bit of unit support already (e.g. pydata/xarray#3643) so we should be able to switch |
Other question, do the errors which come from using wrong shape data for ops make sense? |
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.
Brilliant!
Is it simple to add pow? I guess that is a different case as only a unitless scalar make sense. x ^ 2 [GtC / a] doesn't really make sense??
I don't know. I don't think it will be as simple because it should be dimensionless as you say. One for another PR/new issue? |
Maybe not. I don't think that the ops follow broadcasting rules. The case where |
I think so too |
70f9c60
to
ff82302
Compare
@lewisjared this should be good to go, outstanding issues:
|
I think the docs could be tricky so that's a future us problem |
Pull request
Please confirm that this pull request has done the following:
CHANGELOG.rst
addedAdding to CHANGELOG.rst
Please add a single line in the changelog notes similar to one of the following: