class_docstr: LaplacianNd tests
code: def test_linearoperator_shape_dtype(self, grid_shape, bc, dtype):
      lap = LaplacianNd(grid_shape, boundary_conditions=bc, dtype=dtype)
      n = np.prod(grid_shape)
      assert lap.shape == (n, n)
      assert lap.dtype == dtype
      assert_array_equal(
          LaplacianNd(
              grid_shape, boundary_conditions=bc, dtype=dtype
          ).toarray(),
          LaplacianNd(grid_shape, boundary_conditions=bc)
          .toarray()
          .astype(dtype),
      )
      assert_array_equal(
          LaplacianNd(grid_shape, boundary_conditions=bc, dtype=dtype)
          .tosparse()
          .toarray(),
          LaplacianNd(grid_shape, boundary_conditions=bc)
          .tosparse()
          .toarray()
          .astype(dtype),
      )
  
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 6 for calling the TestLaplacianNd obj's underlying member method code with example usage: obj.test_linearoperator_shape_dtype(grid_shape, bc, dtype) without return types