Perry Greenfield wrote:

>Great!
>
>On Mar 26, 2007, at 4:52 PM, Travis Oliphant wrote:
>
>  
>
>>I've finally made the changes to fix the scalar coercion model  
>>problems
>>in NumPy 1.0.1
>>
>>Now, scalar coercion rules only apply when involved types are of the
>>same basic "kind".
>>    
>>

Actually, the rule is better stated.  The scalar coercion rules apply 
when involved types are of the same basic "kind" or if the scalar is of 
"lesser" kind than the array.

Thus,

array([1,2,3],float32)*10    produces a float32 array
array([1,2,3],float32)*10.0  produces a float32 array
array([1,2,3],float32)*10.0j produces a complex128 array

-Travis

_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to