Hi All, Currently we have:
In [2]: ones(1,dtype=int8) << ones(1,dtype=uint8) Out[2]: array([2], dtype=int16) In [4]: ones(1,dtype=int64) << ones(1,dtype=uint64) Out[4]: array([2], dtype=object) Note the increased size in the first case and the return of a Python long integer object in the second. I propose that these operators should preserve the type of the first argument, although this is not easy to do with the current ufunc setup. It is impossible to use a type of sufficient size for all shift values and preserving the type of the first argument is what I think most folks would expect. Chuck
_______________________________________________ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion