[NumPy-Tickets] [NumPy] #1136: Multiplying Python float to numpy.array of objects works but fails with a numpy.float64
NumPy Trac
numpy-tickets@scipy....
Thu Mar 24 17:41:21 CDT 2011
#1136: Multiplying Python float to numpy.array of objects works but fails with a
numpy.float64
----------------------------------------+-----------------------------------
Reporter: sebastian.walter@… | Owner: somebody
Type: defect | Status: new
Priority: normal | Milestone: Unscheduled
Component: numpy.core | Version: devel
Keywords: |
----------------------------------------+-----------------------------------
Changes (by mwiebe):
* milestone: 1.5.1 => Unscheduled
Comment:
It's not necessary to introduce the "adouble" type, just making u an
object array is enough:
{{{
In [19]: v = np.array([2,3], dtype=object)
In [20]: v * z[0]
---------------------------------------------------------------------------
TypeError Traceback (most recent call
last)
/home/mwiebe/<ipython-input-20-384f41272ec5> in <module>()
----> 1 v * z[0]
TypeError: unsupported operand type(s) for *: 'numpy.ndarray' and
'numpy.float64'
}}}
--
Ticket URL: <http://projects.scipy.org/numpy/ticket/1136#comment:4>
NumPy <http://projects.scipy.org/numpy>
My example project
More information about the NumPy-Tickets
mailing list