[Numpy-discussion] numpy.floor() is supposed to return an int, but returns a float
Webb Sprague
webb.sprague at gmail.com
Sun Apr 9 15:21:01 CDT 2006
Could someone explain this behavior:
In [13]: type(N.floor(1))
Out[13]: <type 'float64scalar'>
In [14]: N.floor?
Type: ufunc
String Form: <ufunc 'floor'>
Namespace: Interactive
Docstring:
y = floor(x) elementwise largest integer <= x
I wouldn't complain, except the only time I use floor() is to make
indices (dividing ages by age widths, for example).
Thanks!
More information about the Numpy-discussion
mailing list