You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ENH: Allow relative and/or absolute precision in assert_almost_equal
This commit makes `assert_almost_equal` accept both relative and
absolute precision when comparing numbers, through two new keyword
arguments: `rtol`, and `atol`, respectively.
Under the hood, `_libs.testing.assert_almost_equal` is now calling
`math.isclose`, instead of an adaptaion of
[numpy.testing.assert_almost_equal](https://docs.scipy.org/doc/numpy-1.17.0/reference/generated/numpy.testing.assert_almost_equal.html).
Copy file name to clipboardExpand all lines: doc/source/whatsnew/v1.1.0.rst
+3Lines changed: 3 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -781,6 +781,9 @@ Deprecations
781
781
- The ``squeeze`` keyword in the ``groupby`` function is deprecated and will be removed in a future version (:issue:`32380`)
782
782
- The ``tz`` keyword in :meth:`Period.to_timestamp` is deprecated and will be removed in a future version; use `per.to_timestamp(...).tz_localize(tz)`` instead (:issue:`34522`)
783
783
- :meth:`DatetimeIndex.to_perioddelta` is deprecated and will be removed in a future version. Use ``index - index.to_period(freq).to_timestamp()`` instead (:issue:`34853`)
784
+
- :meth:`util.testing.assert_almost_equal` now accepts both relative and absolute
785
+
precision through the ``rtol``, and ``atol`` parameters, thus deprecating the
0 commit comments