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 / io / _mmio / MMFile / _open

staticmethod

scipy.io._mmio:MMFile._open

source: build-install/usr/lib/python3.14/site-packages/scipy/io/_mmio.py:431

Signature

staticmethoddef _open(filespec, mode = rb)

Summary

Return an open file stream for reading based on source.

Extended Summary

If source is a file name, open it (after trying to find it with mtx and gzipped mtx extensions). Otherwise, just return source.

Parameters

filespec : str or file-like

String giving file name or file-like object

mode : str, optional

Mode with which to open file, if filespec is a file name.

Returns

fobj : file-like

Open file-like object.

close_it : bool

True if the calling function should close this file when done, false otherwise.

Aliases

  • scipy.io._mmio.MMFile._open