> > Although 1.5.1 also gives > > >>> np.uint(3) + 4 > 7.0 > > i.e., a float, which certainly doesn't look right either. Whereas > > >>> np.int(3) + 4 > 7 > > The float promotion is still there in 1.6.1 > > In [4]: uint64(1) + 2 > Out[4]: 3.0 > > So I suppose there is the larger question is how combining numpy scalars with > python scalars should be done in general. >
Yes, exactly! This is a good discussion to have. As mentioned before, I would also like to see the NumPy scalars get their own math instead of re-using the umath machinery. In the case of scalars, it would seem to make sense to interpret integers as signed or unsigned based on their value. -Travis
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion