diff options
author | Sebastian Berg <sebastian@sipsolutions.net> | 2022-01-14 11:56:06 -0600 |
---|---|---|
committer | Sebastian Berg <sebastian@sipsolutions.net> | 2022-01-14 20:07:07 -0600 |
commit | eb68e8709c76f466fae8f5229cea3ee1afbad754 (patch) | |
tree | 40e91c558af361707b8764d6f282624c3e0ec28a /numpy/lib/npyio.py | |
parent | d58d3612cb3417c3516992b45ac04f7cbf1209a0 (diff) | |
download | numpy-eb68e8709c76f466fae8f5229cea3ee1afbad754.tar.gz |
MAINT: Use skiplines rather than skiprows internally throughout
Skiplines is just the more clear names since "rows" make a lot of
sense for output rows (which implies that a line is not empty for
example)
Diffstat (limited to 'numpy/lib/npyio.py')
-rw-r--r-- | numpy/lib/npyio.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/numpy/lib/npyio.py b/numpy/lib/npyio.py index f15f94580..a23150832 100644 --- a/numpy/lib/npyio.py +++ b/numpy/lib/npyio.py @@ -799,7 +799,7 @@ _loadtxt_chunksize = 50000 def _read(fname, *, delimiter=',', comment='#', quote='"', - imaginary_unit='j', usecols=None, skiprows=0, + imaginary_unit='j', usecols=None, skiplines=0, max_rows=None, converters=None, ndmin=None, unpack=False, dtype=np.float64, encoding="bytes"): r""" @@ -829,7 +829,7 @@ def _read(fname, *, delimiter=',', comment='#', quote='"', A one-dimensional array of integer column numbers. These are the columns from the file to be included in the array. If this value is not given, all the columns are used. - skiprows : int, optional + skiplines : int, optional Number of lines to skip before interpreting the data in the file. max_rows : int, optional Maximum number of rows of data to read. Default is to read the @@ -953,7 +953,7 @@ def _read(fname, *, delimiter=',', comment='#', quote='"', if len(imaginary_unit) != 1: raise ValueError('len(imaginary_unit) must be 1.') - _check_nonneg_int(skiprows) + _check_nonneg_int(skiplines) if max_rows is not None: _check_nonneg_int(max_rows) else: @@ -994,7 +994,7 @@ def _read(fname, *, delimiter=',', comment='#', quote='"', arr = _load_from_filelike( data, delimiter=delimiter, comment=comment, quote=quote, imaginary_unit=imaginary_unit, - usecols=usecols, skiprows=skiprows, max_rows=max_rows, + usecols=usecols, skiplines=skiplines, max_rows=max_rows, converters=converters, dtype=dtype, encoding=encoding, filelike=filelike, byte_converters=byte_converters) @@ -1021,7 +1021,7 @@ def _read(fname, *, delimiter=',', comment='#', quote='"', next_arr = _load_from_filelike( data, delimiter=delimiter, comment=comment, quote=quote, imaginary_unit=imaginary_unit, - usecols=usecols, skiprows=skiprows, max_rows=max_rows, + usecols=usecols, skiplines=skiplines, max_rows=max_rows, converters=converters, dtype=dtype, encoding=encoding, filelike=filelike, byte_converters=byte_converters, @@ -1238,7 +1238,7 @@ def loadtxt(fname, dtype=float, comments='#', delimiter=None, x.decode('latin1') if isinstance(x, bytes) else x for x in comment] arr = _read(fname, dtype=dtype, comment=comment, delimiter=delimiter, - converters=converters, skiprows=skiprows, usecols=usecols, + converters=converters, skiplines=skiprows, usecols=usecols, unpack=unpack, ndmin=ndmin, encoding=encoding, max_rows=max_rows, quote=quotechar) |