Re: [Numpy-discussion] equivalent to isempty command in matlab (newbie question)
by Robert Kern other posts by this author
Dec 6 2006 9:21AM messages near this date
Re: [Numpy-discussion] equivalent to isempty command in matlab (newbie question)
|
Re: [Numpy-discussion] equivalent to isempty command in matlab (newbie question)
Filip Wasilewski wrote:
> Just like for other Python objects:
>
> if ifs3:
> print "not empty"
No, that doesn't work. numpy arrays do not have a truth value. They raise an
error when you try to use them in such a context.
--
Robert Kern
"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
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@[...].org
http://projects.scipy.org/mailman/listinfo/numpy-discussion
Thread:
Giorgio Luciano
Filip Wasilewski
Robert Kern
Filip Wasilewski
Robert Kern
|