On Thursday 24 August 2006 17:28, Travis Oliphant wrote:
> Sebastian Haase wrote:
> >Hi,
> >I get
> >TypeError: array cannot be safely cast to required type
> >
> >when calling hstack()  ( which calls  concatenate() )
> >on two arrays being a int32 and a float32 respectively.
> >
> >I understand now that a int32 cannot be safely converted into a float32
> >but why does  concatenate  not automatically
> >up(?) cast to float64  ??
>
> Basically, NumPy is following Numeric's behavior of raising an error in
> this case of unsafe casting in concatenate.  For functions that are not
> universal-function objects, mixed-type behavior works basically just
> like Numeric did (using the ordering of the types to determine which one
> to choose as the output).
>
> It could be argued that the ufunc-rules should be followed instead.
>
> -Travis
>
Are you saying the  ufunc-rules  would convert "int32-float32" to float64  and 
hence make my code "just work" !?

And why are there two sets of rules ?
Are the Numeric rules used at many places ?

Thanks,
Sebastian Haase


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion

Reply via email to