|
From: Joachim S. <li...@js...> - 2006-01-17 12:48:05
|
Hello all, I have observed a weird behaviour with 24.2, which actually can break existing code: >>> import Numeric >>> Numeric.__version__ '23.8' >>> x=Numeric.zeros(5) >>> type(x[0]) <type 'int'> >>> x=Numeric.zeros(5,'f') >>> type(x[0]) <type 'float'> >>> This is what I would expect. However, using 24.2: >>> import Numeric >>> Numeric.__version__ '24.2' >>> x=Numeric.zeros(5) >>> type(x[0]) <type 'int'> >>> x=Numeric.zeros(5, 'f') >>> type(x[0]) <type 'array'> >>> print type(1*x[0]) <type 'float'> Strange, isn't it? Is there any rationale behind this inconsistent behaviour or is it just a bug? Cheers, Joachim |