[Numpy-discussion] round, floor and ceil ?

Chris Barker chrishbarker at home.net
Thu Jul 26 14:53:16 CDT 2001


Robert Kern wrote:
> >>> Numeric.floor
> <ufunc 'floor'>
> >>> Numeric.ceil
> <ufunc 'ceil'>
> >>> Numeric.around
> <function around at 0x807439c>

DOH!  I had just been looking for round, but Ithought I had checked for
ceil and floor as wel, but I guess not. sorry for the stupid question.

I can point out that none of these is in the doc.

Paul, is there any way any of us can contribute to the doc??

 
> The last one isn't a ufunc, but it's composed of them.
]
It seems to act like one:
>>> floor([3.3,3.5,3.6])
array([ 3.,  3.,  3.])

probably because it is composed of them.

> a function so that it can match Python's rounding behavior.

It does seem to match Python's native round, which makes me wonder why
it can't be called "round", since it will behave the same for regulat
python number types. NOt a big deal, of course.

-thanks, Chris


-- 
Christopher Barker,
Ph.D.                                                           
ChrisHBarker at home.net                 ---           ---           ---
http://members.home.net/barkerlohmann ---@@       -----@@       -----@@
                                   ------@@@     ------@@@     ------@@@
Oil Spill Modeling                ------   @    ------   @   ------   @
Water Resources Engineering       -------      ---------     --------    
Coastal and Fluvial Hydrodynamics --------------------------------------
------------------------------------------------------------------------




More information about the Numpy-discussion mailing list