[SciPy-User] [scipy-user] How to remove a value from an np array?
Mon Jan 30 08:35:45 CST 2012
On Mon, Jan 30, 2012 at 14:22, Fabien Lafont <firstname.lastname@example.org> wrote:
> Sorry to be boring but do you have any idea?
> I want to have an array with 2 columns and erase the entire line when
> it find a "nan" in the second column?
y = x[~np.isnan(x[:,1])]
"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
-- Umberto Eco
More information about the SciPy-User