[NumPy-Tickets] [NumPy] #870: np.asarray does not create new array view when different but compatible type code is passed in the dtype argument
NumPy Trac
numpy-tickets@scipy....
Wed Jan 20 12:19:47 CST 2010
#870: np.asarray does not create new array view when different but compatible
type code is passed in the dtype argument
-------------------------+--------------------------------------------------
Reporter: damian.eads | Owner: stefan
Type: defect | Status: accepted
Priority: normal | Milestone:
Component: numpy.core | Version: none
Keywords: |
-------------------------+--------------------------------------------------
Comment(by tihocan):
'''Another workaround'''
I'm having the same problem and found that using .view instead of giving a
dtype to asarray may do the trick. Example:
{{{
Y=numpy.asarray(X).view(numpy.intc)
}}}
--
Ticket URL: <http://projects.scipy.org/numpy/ticket/870#comment:2>
NumPy <http://projects.scipy.org/numpy>
My example project
More information about the NumPy-Tickets
mailing list