class_docstr: LaplacianNd tests
docstr: Test the dot-product for type preservation and consistency.
          
docstr_tok: ["Test","the","dot-product","for","type","preservation","and","consistency","."]
code: def test_dot(self, grid_shape, bc, dtype):
      """Test the dot-product for type preservation and consistency."""
      lap = LaplacianNd(grid_shape, boundary_conditions=bc)
      n = np.prod(grid_shape)
      x0 = np.arange(n)
      x1 = x0.reshape((-1, 1))
      x2 = np.arange(2 * n).reshape((n, 2))
      input_set = [x0, x1, x2]
      for x in input_set:
          y = lap.dot(x.astype(dtype))
          assert x.shape == y.shape
          assert y.dtype == dtype
          if x.ndim == 2:
              yy = lap.toarray() @ x.astype(dtype)
              assert yy.dtype == dtype
              np.array_equal(y, yy)
  
imports: import pytest
  import numpy
  from numpy.testing import assert_array_equal, assert_allclose
  from scipy.sparse import diags, csgraph
  from scipy.linalg import eigh
  from scipy.sparse.linalg import LaplacianNd
  from scipy.sparse.linalg._special_sparse_arrays import Sakurai
  from scipy.sparse.linalg._special_sparse_arrays import MikotaPair
label_desc: Use image node_id 7 for calling the TestLaplacianNd obj's underlying member method code with example usage: obj.test_dot(grid_shape, bc, dtype) without return types