[NumPy-Tickets] [NumPy] #1869: np.place produce bad data with structured array columns as input
NumPy Trac
numpy-tickets@scipy....
Thu Jun 16 04:50:24 CDT 2011
#1869: np.place produce bad data with structured array columns as input
------------------------+---------------------------------------------------
Reporter: ged | Owner: somebody
Type: defect | Status: new
Priority: high | Milestone: Unscheduled
Component: numpy.core | Version: 1.6.0
Keywords: |
------------------------+---------------------------------------------------
Comment(by ged):
Forgot to say that there are simple workarounds:
{{{
np.place(arr, mask, a['x'].copy())
arr[mask] = a['x']
}}}
both work fine. I think it's quite important nonetheless because of its
silent nature.
I suspect the same problem will be present for other kinds of inputs with
non contiguous memory layouts, though I didn't test that.
--
Ticket URL: <http://projects.scipy.org/numpy/ticket/1869#comment:1>
NumPy <http://projects.scipy.org/numpy>
My example project
More information about the NumPy-Tickets
mailing list