implement floor and ceil #111

Closed
opened 2021-11-23 17:32:08 +08:00 by sb10q · 1 comment

Unlike round(), those return floats.

Python 3.9.6 (default, Jun 28 2021, 08:57:49) 
[GCC 10.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from numpy import floor, ceil
>>> floor(3.3)
3.0
>>> ceil(3.4)
4.0
>>> 

Unlike ``round()``, those return floats. ``` Python 3.9.6 (default, Jun 28 2021, 08:57:49) [GCC 10.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from numpy import floor, ceil >>> floor(3.3) 3.0 >>> ceil(3.4) 4.0 >>> ```
ychenfo was assigned by sb10q 2021-11-23 17:32:25 +08:00
sb10q changed title from implement numpy.floor and numpy.ceil to implement floor and ceil 2021-11-23 17:33:17 +08:00
Poster
Owner

Actually, for consistency, let's implement the ones from math instead. The Mirny driver (where I found the issue) wants integers in the end anyway.

>>> from math import floor, ceil
>>> floor(3.3)
3
>>> ceil(3.4)
4
>>> 

...and as before let's have floor64 and ceil64.

Actually, for consistency, let's implement the ones from ``math`` instead. The Mirny driver (where I found the issue) wants integers in the end anyway. ``` >>> from math import floor, ceil >>> floor(3.3) 3 >>> ceil(3.4) 4 >>> ``` ...and as before let's have ``floor64`` and ``ceil64``.
sb10q closed this issue 2021-12-03 16:36:30 +08:00
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: M-Labs/nac3#111
There is no content yet.