astropy.units.isclose broken in astropy 5.1
See original GitHub issueDescription
astropy.units.isclose
returns false for values within floating point precisions
Expected behavior
astropy.units.isclose
returns true for values within floating point precisions
Actual behavior
astropy.units.isclose
returns false for values within floating point precisions
Steps to Reproduce
In [1]: import astropy.units as u
In [2]: import numpy as np
In [3]: u.isclose(0 * u.m, np.finfo(np.float64).eps * u.m)
Out[3]: False
In [4]: u.isclose(0, np.finfo(np.float64).eps)
Out[4]: False
In [5]: np.isclose(0, np.finfo(np.float64).eps)
Out[5]: True.
System Details
Linux-5.10.109-1-MANJARO-x86_64-with-glibc2.10
Python 3.8.13 | packaged by conda-forge | (default, Mar 25 2022, 06:04:18)
[GCC 10.3.0]
Numpy 1.22.3
pyerfa 2.0.0.1
astropy 5.1
Scipy 1.8.0
Matplotlib 3.5.1
Issue Analytics
- State:
- Created a year ago
- Comments:9 (8 by maintainers)
Top Results From Across the Web
isclose — Astropy v5.1.1
The units (or lack thereof) of a , b , and atol must be consistent with each other. If None , atol defaults...
Read more >Astropy Documentation, Release 0.3b1 - Read the Docs
The “Astropy Project” is distinct from the astropy package. The Astropy Project is a process intended to facilitate.
Read more >Full Changelog — Astropy v3.2.3 - Read the Docs
Fixed a bug [#9168] where having a kernel defined using unitless astropy ... Allow conversion of Column with logarithmic units to a suitable...
Read more >Astropy Documentation - manualzz
Specify a description, units and output formatting for columns. ... CONSTANTS) 5.1 Introduction astropy.constants contains a number of physical constants ...
Read more >Magnetic Fields within the Hub-filament Structure in IC 5146
The output I, Q, and U maps were calibrated in units of ... Figure 4 with a bin size of 10° that is...
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
Mmh. I am confused now. I cannot reproduce locally. Test passes with 5.1 locally… So it has to be something else, sorry for the fuzz. Still confusing why it worked before.
I got a broken test in the CI of ctapipe after it started using 5.1