Skip to content

Commit 4391dfd

Browse files
author
y-p
committed
BUG: check_less_precise in assert_almost_equal with val=float throws exception
1 parent 9f17a9a commit 4391dfd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pandas/util/testing.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,8 @@ def assert_almost_equal(a, b, check_less_precise = False):
136136

137137
# deal with differing dtypes
138138
if check_less_precise:
139-
dtype_a = np.dtype(a)
140-
dtype_b = np.dtype(b)
139+
dtype_a = np.dtype(type(a))
140+
dtype_b = np.dtype(type(b))
141141
if dtype_a.kind == 'i' and dtype_b == 'i':
142142
pass
143143
if dtype_a.kind == 'f' and dtype_b == 'f':

0 commit comments

Comments
 (0)