bundles / scipy latest / 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-likeString giving file name or file-like object
mode: str, optionalMode with which to open file, if
filespecis a file name.
Returns
fobj: file-likeOpen file-like object.
close_it: boolTrue if the calling function should close this file when done, false otherwise.
Aliases
-
scipy.io._mmio.MMFile._open