@@ -314,18 +314,18 @@ def _check_proxy_interface(self, imaker, meth_name):
314
314
# New data dtype, no caching, doesn't use or alter cache
315
315
fdata_new_dt = img .get_fdata (caching = 'unchanged' , dtype = 'f4' )
316
316
# We get back the original read, not the modified cache
317
- assert_array_equal (fdata_new_dt , proxy_data .astype ('f4' ))
317
+ assert_almost_equal (fdata_new_dt , proxy_data .astype ('f4' ))
318
318
assert_equal (fdata_new_dt .dtype , np .float32 )
319
319
# The original cache stays in place, for default float64
320
320
assert_array_equal (img .get_fdata (), 42 )
321
321
# And for not-default float32, because we haven't cached
322
322
fdata_new_dt [:] = 43
323
323
fdata_new_dt = img .get_fdata (caching = 'unchanged' , dtype = 'f4' )
324
- assert_array_equal (fdata_new_dt , proxy_data .astype ('f4' ))
324
+ assert_almost_equal (fdata_new_dt , proxy_data .astype ('f4' ))
325
325
# Until we reset with caching='fill', at which point we
326
326
# drop the original float64 cache, and have a float32 cache
327
327
fdata_new_dt = img .get_fdata (caching = 'fill' , dtype = 'f4' )
328
- assert_array_equal (fdata_new_dt , proxy_data .astype ('f4' ))
328
+ assert_almost_equal (fdata_new_dt , proxy_data .astype ('f4' ))
329
329
# We're using the cache, for dtype='f4' reads
330
330
fdata_new_dt [:] = 43
331
331
assert_array_equal (img .get_fdata (dtype = 'f4' ), 43 )
0 commit comments