code: def test_float_affine(self):
      # Check affines get converted to float
      img_klass = self.image_class
      arr, aff, hdr, sub_hdr, mlist = (
          self.img.get_fdata(),
          self.img.affine,
          self.img.header,
          self.img.get_subheaders(),
          self.img.get_mlist(),
      )
      img = img_klass(arr, aff.astype(np.float32), hdr, sub_hdr, mlist)
      assert img.affine.dtype == np.dtype(np.float64)
      img = img_klass(arr, aff.astype(np.int16), hdr, sub_hdr, mlist)
      assert img.affine.dtype == np.dtype(np.float64)
  
imports: import os
  import warnings
  from pathlib import Path
  from unittest import TestCase
  import numpy
  import pytest
  from numpy.testing import assert_array_almost_equal, assert_array_equal
  from ..ecat import EcatHeader, EcatImage, EcatSubHeader, get_frame_order, get_series_framenumbers, read_mlist
  from ..openers import Opener
  from ..testing import data_path, suppress_warnings
  from ..tmpdirs import InTemporaryDirectory
  from .None import test_wrapstruct
  from .test_fileslice import slicer_samples
label_desc: Use image node_id 7 for calling the TestEcatImage obj's underlying member method code with example usage: obj.test_float_affine() without return types