summaryrefslogtreecommitdiff
path: root/numpy/ma/mrecords.py
diff options
context:
space:
mode:
authorSebastian Berg <sebastian@sipsolutions.net>2021-09-21 15:54:11 -0700
committerGitHub <noreply@github.com>2021-09-21 15:54:11 -0700
commit66d33faabf1f19d4b192c38e927dfa727b0ed61f (patch)
treef657cee2e071c1394f993abf9f1b3a18504414c6 /numpy/ma/mrecords.py
parenta838abe68ce6bf8164c31cc35a2ac8d5485754ec (diff)
parent83960267dc097742cb67ef575504afa56f82b102 (diff)
downloadnumpy-66d33faabf1f19d4b192c38e927dfa727b0ed61f.tar.gz
Merge pull request #19911 from DimitriPapadopoulos/codespell
DOC: Typos found by codespell
Diffstat (limited to 'numpy/ma/mrecords.py')
-rw-r--r--numpy/ma/mrecords.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/numpy/ma/mrecords.py b/numpy/ma/mrecords.py
index 10b1b209c..bdce8b3bd 100644
--- a/numpy/ma/mrecords.py
+++ b/numpy/ma/mrecords.py
@@ -667,7 +667,7 @@ def openfile(fname):
raise NotImplementedError("Wow, binary file")
-def fromtextfile(fname, delimitor=None, commentchar='#', missingchar='',
+def fromtextfile(fname, delimiter=None, commentchar='#', missingchar='',
varnames=None, vartypes=None):
"""
Creates a mrecarray from data stored in the file `filename`.
@@ -676,7 +676,7 @@ def fromtextfile(fname, delimitor=None, commentchar='#', missingchar='',
----------
fname : {file name/handle}
Handle of an opened file.
- delimitor : {None, string}, optional
+ delimiter : {None, string}, optional
Alphanumeric character used to separate columns in the file.
If None, any (group of) white spacestring(s) will be used.
commentchar : {'#', string}, optional
@@ -699,14 +699,14 @@ def fromtextfile(fname, delimitor=None, commentchar='#', missingchar='',
while True:
line = ftext.readline()
firstline = line[:line.find(commentchar)].strip()
- _varnames = firstline.split(delimitor)
+ _varnames = firstline.split(delimiter)
if len(_varnames) > 1:
break
if varnames is None:
varnames = _varnames
# Get the data.
- _variables = masked_array([line.strip().split(delimitor) for line in ftext
+ _variables = masked_array([line.strip().split(delimiter) for line in ftext
if line[0] != commentchar and len(line) > 1])
(_, nfields) = _variables.shape
ftext.close()