[NumPy-Tickets] [NumPy] #1758: Assiging to structured array rows with list/array fails
NumPy Trac
numpy-tickets@scipy....
Tue Mar 8 23:22:14 CST 2011
#1758: Assiging to structured array rows with list/array fails
------------------------+---------------------------------------------------
Reporter: rgommers | Owner: somebody
Type: defect | Status: new
Priority: normal | Milestone: Unscheduled
Component: numpy.core | Version: devel
Keywords: |
------------------------+---------------------------------------------------
Comment(by rgommers):
For the array assignment part, it does work when no casting has to be
done. From Skipper on-list:
{{{
This is a casting issue. Your array is an integer array. You can
assign with an array.
arr = np.zeros((5,), dtype=[('var1','f8'),('var2','f8')])
arr[0] = np.array([10.0,20])
arr[0]
(10.0, 20.0)
}}}
Still a bug, since casting elements of a tuple works fine.
--
Ticket URL: <http://projects.scipy.org/numpy/ticket/1758#comment:1>
NumPy <http://projects.scipy.org/numpy>
My example project
More information about the NumPy-Tickets
mailing list