This is a pre-release version (2.0.0.dev0+git20260907.41eeb59).Go to latest (1.18.0)
{ } Raw JSON

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.sparray

The shape is (N, N) where N = np.prod(grid_shape).

Aliases

  • scipy.sparse.linalg.LaplacianNd.tosparse