|
From: Sasha <nd...@ma...> - 2006-02-23 03:51:21
|
I was looking for a model to implement "round" in C and discovered
that floor and ceil functions change the type of their arguments:
>>> floor(array([1,2,3],dtype=3D'i2')).dtype
dtype('<f4')
>>> floor(array([1,2,3],dtype=3D'i4')).dtype
dtype('<f8')
I know that this is the same behavior as in Numeric, but wouldn't it
be more natural if fllor and ceil return the argument unchanged (maybe
a copy) if it is already integer?
|