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 functools
  from unittest import expectedFailure, skipIf
  from pytest import raises
  from torch.testing._internal.common_utils import instantiate_parametrized_tests, parametrize, run_tests, TEST_WITH_TORCHDYNAMO, TestCase, xpassIfTorchDynamo
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