code: def test_accepts_longdouble(self):
      # regression tests for #16945
      grid64 = mgrid[0.1:0.33:0.1,]
      grid128 = mgrid[
          np.longdouble(0.1) : np.longdouble(0.33) : np.longdouble(0.1),
      ]
      assert_(grid128.dtype == np.longdouble)
      assert_array_almost_equal(grid64, grid128)
  
      grid128c_a = mgrid[0 : np.longdouble(1) : 3.4j]
      grid128c_b = mgrid[0 : np.longdouble(1) : 3.4j,]
      assert_(grid128c_a.dtype == grid128c_b.dtype == np.longdouble)
      assert_array_equal(grid128c_a, grid128c_b[0])
  
      # different code path for single slice
      grid64 = mgrid[0.1:0.33:0.1]
      grid128 = mgrid[
          np.longdouble(0.1) : np.longdouble(0.33) : np.longdouble(0.1)
      ]
      assert_(grid128.dtype == np.longdouble)
      assert_array_almost_equal(grid64, grid128)
  
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_impl import mgrid, ogrid, ndenumerate, fill_diagonal, diag_indices, diag_indices_from, index_exp, ndindex, c_, r_, s_, ix_
label_desc: Use image node_id 7 for calling the TestGrid obj's underlying member method code with example usage: obj.test_accepts_longdouble() without return types