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

to_compact: support uncertainties' Magnitudes , keeping warning #1911

Merged
merged 3 commits into from
Jan 3, 2024

Conversation

andrewgsavage
Copy link
Collaborator

@andrewgsavage andrewgsavage commented Jan 1, 2024

  • Closes Question: to_compact for Measurements #584
  • Executed pre-commit run --all-files with no errors
  • The change is fully covered by automated unit tests
  • Documented in docs/ as appropriate
  • Added an entry to the CHANGES file

Copy link

codspeed-hq bot commented Jan 1, 2024

CodSpeed Performance Report

Merging #1911 will not alter performance

Comparing andrewgsavage:ndarray_strip (188c87e) with master (29a139f)

Summary

✅ 439 untouched benchmarks

Copy link

@doronbehar doronbehar left a comment

Choose a reason for hiding this comment

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

Looks better then my PR! Please mark this as a "closing #584".

@@ -100,7 +100,9 @@ def to_compact(
<Quantity(10.0, 'millinewton')>
"""

if not isinstance(quantity.magnitude, numbers.Number):
if not isinstance(quantity.magnitude, numbers.Number) and not hasattr(

Choose a reason for hiding this comment

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

Nicer indeed!

@hgrecco
Copy link
Owner

hgrecco commented Jan 1, 2024

I think is read for merging, right @andrewgsavage ?

@andrewgsavage
Copy link
Collaborator Author

sure go for it

@hgrecco hgrecco merged commit 0f24b6f into hgrecco:master Jan 3, 2024
34 checks passed
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.

Question: to_compact for Measurements
3 participants