#24276·scipy

DOC: linalg: incorrect comparison to `np.linalg`

Author: bwolleswinkelCreated Jan 5, 2026Updated Sep 16, 2026
Labelsscipy.linalgDocumentationsustain-2026

Issue with current documentation:

The documentation of scipy states that (doc):

scipy.linalg contains all the functions in numpy.linalg. plus some other more advanced ones not contained in numpy.linalg.

However, several (commonly used) functionalities from numpy.linalg are, unfortunately, not available in scipy.linalg, including (but not limited to) numpy.linalg.matrix_rank(...) and numpy.linalg.matrix_power(...), which are used abundantly. This is misleading to users, who would expect the above to be available based on the mentioned documentation, tempting them to rely solely on scipy.linalg (which, as of now, is unfortunately not possible).

Idea or request for content:

I myself see two solutions:

  1. Update the documentation to make it explicit that scipy.linalg cannot be used as a one-on-one replacement for numpy.linalg, as not all functionalities are provided equally.
  2. (Preferred) Add the functionalities provided by numpy.linalg to scipy.linalg. I do not know how hard it is to implement/wrap all of the provided numpy.linalg functionality, but it would be amazing in streamlining code to be able to rely solely on import scipy.linalg as la instead of having to (arbitrarily) switch from SciPy to NumPy.

Additional context (e.g. screenshots, GIFs)

Image