Review astropy.units performance tips
See original GitHub issueSee https://astropy.readthedocs.io/en/latest/units/index.html#performance-tips
- Use of composite units and
<<
to avoid copies - Replace
q.to(unit).value
byq.to_value(unit)
, see http://docs.astropy.org/en/stable/units/quantity.html#converting-to-different-units
Issue Analytics
- State:
- Created 4 years ago
- Comments:13 (13 by maintainers)
Top Results From Across the Web
Considerations on the performance of astropy.units #7438
We also tried Pint, and it's not faster than astropy.units. In fact, it was much slower. Pint has these tips to improve performance...
Read more >Performance Tips — Astropy v5.2
Consider the performance tips that apply to quantities when initializing and evaluating models with quantities. Page Contents. Performance Tips. «.
Read more >Building an Open-science Project and Status of the v2.0 Core ...
This process of listing and promoting affiliated packages is one way in which the Astropy Project tries to increase code re-use in the...
Read more >Astropy quantity in-place conversion - Stack Overflow
1 Answer 1 ... None of these ways copy the Numpy array, so are OK performance-wise for many applications. I don't think there...
Read more >I would go one step further and suggest that all physical ...
Having everything work this way makes it so much easier to review code for errors. Without this means that as a reviewer you...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Another cheap improvement:
Replace those by
q.to_value(unit)
, see above.@priyanshurohilla or anyone in that matter, Why not try in your computer the changes I made as suggested in #857 ? Maybe it’s an intrinsic problem of my computer.Let’s get that cleared, then we can get to the root of it.