From: Peter V. <ve...@em...> - 2004-06-06 16:25:54
|
Is this a bug? This should result in an array of numpy arrays, but it does give an error: >>> a = array([1,2]) >>> b = array([3,4]) >>> c = objects.array([a,b]) Traceback (most recent call last): File "<stdin>", line 1, in ? File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ python2.3/site-packages/numarray/objects.py", line 732, in array return fromlist(sequence, shape) File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ python2.3/site-packages/numarray/objects.py", line 755, in fromlist return ObjectArray(objects=l, shape=shape) File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ python2.3/site-packages/numarray/objects.py", line 506, in __init__ oshape = _shapeFromNestedSequence(objects) File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ python2.3/site-packages/numarray/objects.py", line 289, in _shapeFromNestedSequence return [len(s)] + _shapeFromNestedSequence(s[0]) TypeError: can only concatenate list (not "tuple") to list |