This is a pre-release version (latest).Go to latest (1.18.0)
{ } Raw JSON

bundles / scipy latest / scipy / _lib / _array_api / scipy_namespace_for

function

scipy._lib._array_api:scipy_namespace_for

source: build-install/usr/lib/python3.14/site-packages/scipy/_lib/_array_api.py:370

Signature

def scipy_namespace_for(xp: ModuleType) → ModuleType | None

Summary

Return the scipy-like namespace of a non-NumPy backend

Extended Summary

That is, return the namespace corresponding with backend xp that contains scipy sub-namespaces like linalg and special. If no such namespace exists, return None. Useful for dispatching.

Aliases

  • scipy.interpolate._bsplines.scipy_namespace_for