code: def test_float_affine(self):
      # Check affines get converted to float
      img_klass = self.image_class
      arr = np.arange(3, dtype=np.int16)
      img = img_klass(arr, np.eye(4, dtype=np.float32))
      assert img.affine.dtype == np.dtype(np.float64)
      img = img_klass(arr, np.eye(4, dtype=np.int16))
      assert img.affine.dtype == np.dtype(np.float64)
  
imports: from io import BytesIO
  import numpy
  import pytest
  from numpy.testing import assert_array_almost_equal
  from ..None import load
  from ..imageclasses import spatial_axes_first
  from ..spatialimages import HeaderDataError, SpatialHeader, SpatialImage
  from ..testing import bytesio_round_trip, expires, memmap_after_ufunc
  from ..tmpdirs import InTemporaryDirectory
label_desc: Use image node_id 2 for calling the TestSpatialImage obj's underlying member method code with example usage: obj.test_float_affine() without return types