summaryrefslogtreecommitdiff
path: root/numpy/lib/npyio.py
diff options
context:
space:
mode:
authorWarren Weckesser <warren.weckesser@gmail.com>2014-08-15 19:24:37 -0400
committerWarren Weckesser <warren.weckesser@gmail.com>2014-08-15 19:26:56 -0400
commit9c7689794cf59fc0065da8bba1d97002c7be14e3 (patch)
tree938d16dd7e38fbe573432304f5927ce95de5c41f /numpy/lib/npyio.py
parent50a1dfa08698aa3406085944d5007d99388c8a06 (diff)
downloadnumpy-9c7689794cf59fc0065da8bba1d97002c7be14e3.tar.gz
BUG: io: genfromtxt did not handle filling_values=0 correctly. Closes gh-2317.
Diffstat (limited to 'numpy/lib/npyio.py')
-rw-r--r--numpy/lib/npyio.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/numpy/lib/npyio.py b/numpy/lib/npyio.py
index 0e49dd31c..21d98efe7 100644
--- a/numpy/lib/npyio.py
+++ b/numpy/lib/npyio.py
@@ -1518,7 +1518,9 @@ def genfromtxt(fname, dtype=float, comments='#', delimiter=None,
# Process the filling_values ...............................
# Rename the input for convenience
- user_filling_values = filling_values or []
+ user_filling_values = filling_values
+ if user_filling_values is None:
+ user_filling_values = []
# Define the default
filling_values = [None] * nbcols
# We have a dictionary : update each entry individually