[Numpy-tickets] [NumPy] #927: automatic type-conversin fails for numpy array
NumPy
numpy-tickets@scipy....
Wed Oct 8 05:37:09 CDT 2008
#927: automatic type-conversin fails for numpy array
----------------------------+-----------------------------------------------
Reporter: Qwertz | Owner: somebody
Type: defect | Status: new
Priority: high | Milestone:
Component: numpy.numarray | Version: none
Severity: major | Keywords:
----------------------------+-----------------------------------------------
{{{
#usually, automatic type conversion in python works like this
a = 2
a /= 3.0
#a = 0.66666, type(a) is float
#in numpy an analogous conversion fails
a = numpy.arange(4)
#a is array([0, 1, 2, 3])
a /= 2.1
#a is array([0, 0, 0, 1]) <- bug
#a stays an int array, that's inconsistant with the type conversion shown
above
#shall be like the following instead
a = a/2.1 #works
#array([ 0. , 0.47619048, 0.95238095, 1.42857143])
}}}
--
Ticket URL: <http://scipy.org/scipy/numpy/ticket/927>
NumPy <http://projects.scipy.org/scipy/numpy>
The fundamental package needed for scientific computing with Python.
More information about the Numpy-tickets
mailing list