Hello list,
I don't understand why ceil and floor return real values, while the doc
string says:
The ceil of the scalar `x` is the smallest integer `i`
Wouldn't an integer make more sense?
Numpy version 1.3.0.
Thanks,
Mark
___
NumPy-Discussion
On Wed, Jul 28, 2010 at 2:26 PM, Mark Bakker mark...@gmail.com wrote:
Hello list,
I don't understand why ceil and floor return real values, while the doc
string says:
The ceil of the scalar `x` is the smallest integer `i`
Wouldn't an integer make more sense?
Numpy version 1.3.0.
On 7/28/2010 8:26 AM, Mark Bakker wrote:
I don't understand why ceil and floor return real values
The same for ``round``.
(Note that Python 3 rounds to int.)
Furthermore, it would be nice if each took a ``dtype`` argument.
Alan Isaac
___
Wed, 28 Jul 2010 14:26:36 +0200, Mark Bakker wrote:
I don't understand why ceil and floor return real values, while the doc
string says:
The ceil of the scalar `x` is the smallest integer `i`
Wouldn't an integer make more sense?
Which integer? Only arbitrary-size integers (Python longs)
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
On Wed, Jul 28, 2010 at 11:48, Alan G Isaac ais...@american.edu wrote:
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
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
Thu, 29 Jul 2010 01:16:14 +0200, Sturla Molden wrote:
[clip]
Makes sense. But couldn't a ``dtype`` argument still be useful?
np.ceil(some_array).astype(int)
That's one temporary more. The dtype= argument for all ufuncs wouldn't
probably hurt too much.
--
Pauli Virtanen