diff options
author | Mark Wiebe <mwwiebe@gmail.com> | 2011-08-20 10:13:07 -0700 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2011-08-27 07:26:58 -0600 |
commit | 4c88ab3e0020861488d77b6930d32474a7cce709 (patch) | |
tree | 7b70c0d288e6e833dc76f14c876250dd6147c50e /numpy/core/arrayprint.py | |
parent | 9ecf721659f84dfb760af9742eae7ba7031cfd8b (diff) | |
download | numpy-4c88ab3e0020861488d77b6930d32474a7cce709.tar.gz |
BUG: missingdata: Fix long double printing of NAs
Diffstat (limited to 'numpy/core/arrayprint.py')
-rw-r--r-- | numpy/core/arrayprint.py | 6 |
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) |