[Numpy-discussion] ceil returns real ?

Alan G Isaac aisaac at american.edu
Wed Jul 28 12:48:31 EDT 2010


> Wed, 28 Jul 2010 14:26:36 +0200, Mark Bakker wrote:
>> >  I don't understand why ceil and floor return real values [snip]
>> >  Wouldn't an integer make more sense?


On 7/28/2010 9:39 AM, Pauli Virtanen wrote:
> Which integer? Only arbitrary-size integers (Python longs) are able to
> span the whole floating-point range, but we don't necessarily want
> 	np.ceil(some_array)
> to start returning object arrays, because of efficiency reasons.


Makes sense.  But couldn't a ``dtype`` argument still be useful?

Alan Isaac




More information about the NumPy-Discussion mailing list