mindspore.dataset.vision.read_file
- mindspore.dataset.vision.read_file(filename)[source]
Read a file in binary mode.
- Parameters
filename (str) – The path to the file to be read.
- Returns
numpy.ndarray, the one dimension uint8 data.
- Raises
TypeError – If filename is not of type str.
RuntimeError – If filename does not exist or is not a common file.
- Supported Platforms:
CPU
Examples
>>> import mindspore.dataset.vision as vision >>> output = vision.read_file("/path/to/file")