Skip to content
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

support for "no unit" values #125

Merged
merged 22 commits into from Jul 23, 2021
Merged

Conversation

keewis
Copy link
Collaborator

@keewis keewis commented Jul 22, 2021

This exposes the internal use of None as a "no unit" value and adds the new values requested in #118 (I skipped the integer 1 for now but it should be a single line change to add it).

cc @dcherian, @jbusecke

  • Closes units = "none"? #118
  • Tests added
  • Passes pre-commit run --all-files
  • User visible changes (including notable bug fixes) are documented in whats-new.rst
  • New functions/methods are listed in api.rst

@dcherian
Copy link

"none" as "no unit" seems sensible to me. "1" is dimensionless in the CF conventions. Should that be different from "no units"?

@keewis
Copy link
Collaborator Author

keewis commented Jul 22, 2021

"none" as "no unit" seems sensible to me. "1" is dimensionless in the CF conventions. Should that be different from "no units"?

fine with me. Seems like we shouldn't put this in pint-xarray, then?

@keewis keewis requested a review from TomNicholas July 23, 2021 00:15
Copy link
Collaborator

@TomNicholas TomNicholas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @keewis - the only other thing I would add is some kind of example or note in the documentation to show this feature, beyond just the note in the quantify docstring.

pint_xarray/tests/test_accessors.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@TomNicholas TomNicholas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@keewis
Copy link
Collaborator Author

keewis commented Jul 23, 2021

great, let's merge. I'll try to create a few more PRs with small fixes, merge #110 and then issue a minor release.

@keewis keewis merged commit 0732ea9 into xarray-contrib:master Jul 23, 2021
@keewis keewis deleted the no_unit_values branch July 23, 2021 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

units = "none"?
3 participants