{ } Raw JSON

bundles / scipy 1.17.1 / scipy / io / _mmio / MMFile / _open

staticmethod

scipy.io._mmio:MMFile._open

source: /scipy/io/_mmio.py :422

Signature

staticmethod def   _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