[Numpy-discussion] testing Numeric.array([0])
Rick Ree
rick at bioinformatics.org
Mon Apr 29 11:35:26 CDT 2002
Should Numeric.array([0]) test false? This seems counterintuitive, and
is not the case for the regular python array module.
This recently caused a subtle bug for me when I wanted to find the
indices of an array that met a condition. If only the first element met
the condition, the result was array([0]) -- a non-empty result that
evaluated false.
If this is the intended behavior, can someone tell me the reason?
thanks,
Rick
More information about the Numpy-discussion
mailing list