From: A. M. A. <per...@gm...> - 2006-09-20 03:53:41
|
Hi, What are the rules for datatype conversion in ufuncs? Does ufunc(a,b) always yield the smallest type big enough to represent both a and b? What is the datatype of ufunc.reduce(a)? I ask because I was startled by the following behaviour: >>> a = array([1,1],uint8); print a.dtype; print maximum.reduce(a).dtype; '|u1' '<u4' uint16 behaves similarly, but none of the others seem to involve a conversion (with the possible exception, in SVN, of int32 -> float, possibly only for add.reduce). Thanks, A. M. Archibald |