summaryrefslogtreecommitdiff
path: root/numpy/core/arrayprint.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/core/arrayprint.py')
-rw-r--r--numpy/core/arrayprint.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/numpy/core/arrayprint.py b/numpy/core/arrayprint.py
index ccfca78ec..aad83500e 100644
--- a/numpy/core/arrayprint.py
+++ b/numpy/core/arrayprint.py
@@ -681,7 +681,9 @@ class LongFloatFormat(object):
self.sign = sign
def __call__(self, x):
- if isnan(x):
+ if isna(x):
+ return str(x).replace('NA', _na_str, 1)
+ elif isnan(x):
if self.sign:
return '+' + _nan_str
else:
@@ -694,8 +696,6 @@ class LongFloatFormat(object):
return ' ' + _inf_str
else:
return '-' + _inf_str
- elif isna(x):
- return str(x).replace('NA', _na_str, 1)
elif x >= 0:
if self.sign:
return '+' + format_longfloat(x, self.precision)