Select Rows from Numpy Rec Array Select Rows from Numpy Rec Array numpy numpy

Select Rows from Numpy Rec Array


Try:

array[array['phase']=='P']

array['phase']=='P' returns a boolean numpy array. When idx is a boolean array, array[idx] returns an array composed of those rows where idx is True.


Try this code:

array[array.phase=='P']