python - Removing a row in a numpy recarray -


is there convenient way delete row containing value in recarray? have following array,

a=numpy.array([(1.0, 2.0, 3.0), (4.0, 5.0, 10.0),(1.0,10.0,4.0)],  dtype=[('a', '<f8'), ('b', '<f8'), ('c', '<f8')]) 

and wanted remove rows 10 in b column output is

([(1.0, 2.0, 3.0), (4.0, 5.0, 10.0)],  dtype=[('a', '<f8'), ('b', '<f8'), ('c', '<f8')]) 

is there quick way this?

just pull out relevant rows of original array:

new_a = a[a["b"]!=10.0] 

Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -