Skip to content

Commit 9cde004

Browse files
committed
Merge pull request #6985 from jreback/test_sum
TST: test_frame/test_sum not comparing correctly on smaller sized dtypes (GH6982)
2 parents 107057d + 7cacecf commit 9cde004

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/src/testing.pyx

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ cpdef assert_almost_equal(a, b, bint check_less_precise=False):
121121
dtype_a = np.dtype(type(a))
122122
dtype_b = np.dtype(type(b))
123123
if dtype_a.kind == 'f' and dtype_b == 'f':
124-
if dtype_a.itemsize <= 4 and dtype_b.itemsize <= 4:
124+
if dtype_a.itemsize <= 4 or dtype_b.itemsize <= 4:
125125
decimal = 3
126126

127127
if np.isinf(a):

0 commit comments

Comments
 (0)