<p>I'm having a problem I haven't seen elsewhere (and apologies if it has been answered before).</p>

<p>I see the following behavior (copied verbatim from a python session):</p>
<pre>
Python 2.7.4 (default, Apr  6 2013, 19:55:15) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy as np
>>> x=[[np.zeros(10)] for i in range(10)]
>>> x.index(x[0])
0
>>> x.index(x[1])
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
>>> x[1].append(np.zeros(10))
>>> x.index(x[1])
1
</pre>

<p>Any ideas why I see a ValueError when trying to find the index of a list containing a single ndarray?</p>

-Matt

        
        
        
<br/><hr align="left" width="300" />
View this message in context: <a href="http://numpy-discussion.10968.n7.nabble.com/List-of-arrays-failing-index-remove-etc-tp37544.html">List of arrays failing index(), remove() etc</a><br/>
Sent from the <a href="http://numpy-discussion.10968.n7.nabble.com/">Numpy-discussion mailing list archive</a> at Nabble.com.<br/>