import numpy as np
[3]:
np.version
[3]:
â1.21.4â
[4]:
import numpy as np
[5]:
np.loadtxt(âdata.txtâ)
OSError Traceback (most recent call last)
Input In [5], in <cell line: 1>()
----> 1 np.loadtxt(âdata.txtâ)
File /lib/python3.9/site-packages/numpy/lib/npyio.py:1067, in loadtxt(fname, dtype, comments, delimiter, converters, skiprows, usecols, unpack, ndmin, encoding, max_rows, like)
1065 fname = os_fspath(fname)
1066 if _is_string_like(fname):
â 1067 fh = np.lib._datasource.open(fname, ârtâ, encoding=encoding)
1068 fencoding = getattr(fh, âencodingâ, âlatin1â)
1069 fh = iter(fh)
File /lib/python3.9/site-packages/numpy/lib/_datasource.py:193, in open(path, mode, destpath, encoding, newline)
156 ââ"
157 Open path
with mode
and return the file object.
158
(âŚ)
189
190 ââ"
192 ds = DataSource(destpath)
â 193 return ds.open(path, mode, encoding=encoding, newline=newline)
File /lib/python3.9/site-packages/numpy/lib/_datasource.py:533, in DataSource.open(self, path, mode, encoding, newline)
530 return _file_openers[ext](found, mode=mode,
531 encoding=encoding, newline=newline)
532 else:
â 533 raise IOError("%s not found." % path)
OSError: data.txt not found.