Rafael Sachetto wrote:
> No problem here too.
> Using python 2.5 on Ubuntu Gutsy and the newest NumPy
Okay, I just checked with Travis and we do allow 1-element arrays to have a
truth value because it is unambiguous whereas n-element arrays are ambiguous.
Regardless, *in general* one cannot use l
Rafael Sachetto wrote:
> No problem here too.
> Using python 2.5 on Ubuntu Gutsy and the newest NumPy
That's a bug, then. It should fail. It looks like we're not raising the
exception when there is only one element.
--
Robert Kern
"I have come to believe that the whole world is an enigma, a har
No problem here too.
Using python 2.5 on Ubuntu Gutsy and the newest NumPy
2007/12/17, Robert Kern <[EMAIL PROTECTED]>:
> Peter Stahlir wrote:
> > Hi!
> >
> > I have a list of arrays and want to find an array with list.index(x).
> > Is that possible. I get an
> > ValueError: The truth value of an
Peter Stahlir wrote:
> Hi!
>
> I have a list of arrays and want to find an array with list.index(x).
> Is that possible. I get an
> ValueError: The truth value of an array with more than one element is
> ambiguous. Use a.any() or a.all()
>
>
> For example:
> from numpy import array
> a = array([
On 17 déc, 14:05, "Peter Stahlir" <[EMAIL PROTECTED]>
wrote:
> For example:
> from numpy import array
> a = array([1])
> b = array([2])
> c = [a,b]
> d = c.index(a)
No problem here, Python 2.4.4
--
http://mail.python.org/mailman/listinfo/python-list