On 3/6/07, Alan G Isaac <[EMAIL PROTECTED]> wrote:
> On Tue, 6 Mar 2007, Sebastian Haase apparently wrote:
> > why does
> > numpy.round(a)
> > return a float ?
>
> Because it works with a copy of a.
>
> >>> help(N.round)
> Help on function round_ in module numpy.core.fromnumeric:
> round_(a, decima
On Tue, 6 Mar 2007, Sebastian Haase apparently wrote:
> why does
> numpy.round(a)
> return a float ?
Because it works with a copy of a.
>>> help(N.round)
Help on function round_ in module numpy.core.fromnumeric:
round_(a, decimals=0, out=None)
Returns reference to result. Copies a and rou
Sebastian Haase wrote:
> Hi,
> why does
> numpy.round(a)
> return a float ?
Partly because that's what the underlying C standard library function does and
what the Python function round() does. The reason they do that is because the
range of integers supported by the double precision floating poin
Hi,
why does
numpy.round(a)
return a float ?
I need something that I can use as indices for another array. Do I
have to (implicitly) create a temporary array and use:
N.round(a).astype(N.int) ?
Or is there a simple, clean and easy way to just round
[1.1 4.8]
into
[1 5]
Thanks,
Sebastian
__
Charles R Harris wrote:
> I won't comment on the code itself. Tell us what you want to do and I
> bet we can speed it up.
>
Here's a bit of sample code. It's actually very useful for my purposes.
Are there good ways to express these ideas in numpy as opposed to
using all of the nested loop
Robert Kern gmail.com> writes:
> Yes.
>
> No.
>
That was easy
Thanks Robert,
t.
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion