If I have a list of numpy arrays, then using remove method returns a value error.
For example:
import numpy as np
list = [np.array([1,1,1]),np.array([2,2,2]),np.array([3,3,3])]
list.remove(np.array([2,2,2]))
Would give me
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
I can't seem to get the all() to work, is it just not possible?
list
as a variable since it is a keyword in Python. It can come back to bite you later on. – Justin Peel Jul 1 '10 at 17:40