bundles / scipy 2.0.0.dev0+git20260907.41eeb59 / scipy / sparse / linalg / _special_sparse_arrays / LaplacianNd / tosparse
function
scipy.sparse.linalg._special_sparse_arrays:LaplacianNd.tosparse
source: build-install/usr/lib/python3.14/site-packages/scipy/sparse/linalg/_special_sparse_arrays.py:437
Signature
def tosparse(self)Summary
Constructs a sparse array from the Laplacian data. The returned sparse array format is dependent on the selected boundary conditions.
Returns
L: scipy.sparse.sparrayThe shape is
(N, N)whereN = np.prod(grid_shape).
Aliases
scipy.sparse.linalg.LaplacianNd.tosparse