diff options
author | Mark Wiebe <mwwiebe@gmail.com> | 2011-08-16 20:03:22 -0700 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2011-08-27 07:26:55 -0600 |
commit | 965e4cff5c4c50e8ff051a3363adc6cf6aa640cd (patch) | |
tree | e9b8d484dac4446ef0a3abd24d94e88922093b05 /numpy/lib/function_base.py | |
parent | b1cb211d159c617ee4ebd16266d6f1042417ef75 (diff) | |
download | numpy-965e4cff5c4c50e8ff051a3363adc6cf6aa640cd.tar.gz |
ENH: missingdata: trying some more functions to see how they treat NAs
Diffstat (limited to 'numpy/lib/function_base.py')
-rw-r--r-- | numpy/lib/function_base.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py index caef5c709..411a86955 100644 --- a/numpy/lib/function_base.py +++ b/numpy/lib/function_base.py @@ -3317,6 +3317,7 @@ def delete(arr, obj, axis=None): "invalid entry") newshape[axis]-=1; new = empty(newshape, arr.dtype, arr.flags.fnc) + new.flags.maskna = arr.flags.maskna slobj[axis] = slice(None, obj) new[slobj] = arr[slobj] slobj[axis] = slice(obj,None) @@ -3333,6 +3334,7 @@ def delete(arr, obj, axis=None): return arr.copy() newshape[axis] -= numtodel new = empty(newshape, arr.dtype, arr.flags.fnc) + new.flags.maskna = arr.flags.maskna # copy initial chunk if start == 0: pass @@ -3464,6 +3466,7 @@ def insert(arr, obj, values, axis=None): "in dimension %d" % (obj, N, axis)) newshape[axis] += 1; new = empty(newshape, arr.dtype, arr.flags.fnc) + new.flags.maskna = arr.flags.maskna slobj[axis] = slice(None, obj) new[slobj] = arr[slobj] slobj[axis] = obj @@ -3490,6 +3493,7 @@ def insert(arr, obj, values, axis=None): index2 = setdiff1d(arange(numnew+N),index1) newshape[axis] += numnew new = empty(newshape, arr.dtype, arr.flags.fnc) + new.flags.maskna = arr.flags.maskna slobj2 = [slice(None)]*ndim slobj[axis] = index1 slobj2[axis] = index2 |