code: def test_accepts_npcomplexfloating(self):
      # Related to #16466
      assert_array_almost_equal(
          mgrid[0.1:0.3:3j,], mgrid[0.1 : 0.3 : np.complex64(3j),]
      )
  
      # different code path for single slice
      assert_array_almost_equal(
          mgrid[0.1:0.3:3j], mgrid[0.1 : 0.3 : np.complex64(3j)]
      )
  
      # Related to #16945
      grid64_a = mgrid[0.1:0.3:3.3j]
      grid64_b = mgrid[0.1:0.3:3.3j,][0]
      assert_(grid64_a.dtype == grid64_b.dtype == np.float64)
      assert_array_equal(grid64_a, grid64_b)
  
      grid128_a = mgrid[0.1 : 0.3 : np.clongdouble(3.3j)]
      grid128_b = mgrid[0.1 : 0.3 : np.clongdouble(3.3j),][0]
      assert_(grid128_a.dtype == grid128_b.dtype == np.longdouble)
      assert_array_equal(grid64_a, grid64_b)
  
imports: import pytest
  import numpy
  from numpy.testing import assert_, assert_equal, assert_array_equal, assert_almost_equal, assert_array_almost_equal, assert_raises, assert_raises_regex
  from numpy.lib.index_tricks import mgrid, ogrid, ndenumerate, fill_diagonal, diag_indices, diag_indices_from, index_exp, ndindex, r_, s_, ix_
label_desc: Use image node_id 8 for calling the TestGrid obj's underlying member method code with example usage: obj.test_accepts_npcomplexfloating() without return types