diff options
author | Travis E. Oliphant <teoliphant@gmail.com> | 2012-06-21 01:37:01 -0700 |
---|---|---|
committer | Travis E. Oliphant <teoliphant@gmail.com> | 2012-06-21 01:37:01 -0700 |
commit | 134174c9265dd87ea802c89cac7a89478e3184f4 (patch) | |
tree | 5ec76af2359d8b038175fc2df3754c642c708805 /numpy/polynomial/hermite.py | |
parent | 651ef74c4ebe7d24e727fd444b1985117ef16fae (diff) | |
parent | 3626d0c4fe510d615ef3e5ef3cf4ed2bfb52b53e (diff) | |
download | numpy-134174c9265dd87ea802c89cac7a89478e3184f4.tar.gz |
Merge pull request #297 from njsmith/separate-maskna
Split maskna support out of mainline into a branch
Diffstat (limited to 'numpy/polynomial/hermite.py')
-rw-r--r-- | numpy/polynomial/hermite.py | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/numpy/polynomial/hermite.py b/numpy/polynomial/hermite.py index 229ac26db..0b637f40a 100644 --- a/numpy/polynomial/hermite.py +++ b/numpy/polynomial/hermite.py @@ -1225,9 +1225,8 @@ def hermvander(x, deg) : x = np.array(x, copy=0, ndmin=1) + 0.0 dims = (ideg + 1,) + x.shape - mask = x.flags.maskna dtyp = x.dtype - v = np.empty(dims, dtype=dtyp, maskna=mask) + v = np.empty(dims, dtype=dtyp) v[0] = x*0 + 1 if ideg > 0 : x2 = x*2 @@ -1516,16 +1515,6 @@ def hermfit(x, y, deg, rcond=None, full=False, w=None): lhs = lhs * w rhs = rhs * w - # deal with NA. Note that polyvander propagates NA from x - # into all columns, that is rows for transposed form. - if lhs.flags.maskna or rhs.flags.maskna: - if rhs.ndim == 1: - mask = np.isna(lhs[0]) | np.isna(rhs) - else: - mask = np.isna(lhs[0]) | np.isna(rhs).any(0) - np.copyto(lhs, 0, where=mask) - np.copyto(rhs, 0, where=mask) - # set rcond if rcond is None : rcond = len(x)*np.finfo(x.dtype).eps |