I was needing an array representation of ndindex since ndindex only
gives an iterator but array(list(ndindex)) takes too long. There is
prob some obvious way to do this I am missing but if not feel free to
include this code which is much faster.
In [252]: time a=np.array(list(np.ndindex(10,10,10,
On Thu, Dec 13, 2007 at 02:33:01PM -0500, David Huard wrote:
> Change done.
>
> All tests pass.
Now's a good time to fix that :)
Cheers
Stéfan
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy
On Dec 13, 2007, at 2:21 PM, Robert Kern wrote:
> Tony S Yu wrote:
>> Hello,
>>
>> This is something that's been bothering for awhile. When numpy raises
>> the following divide by zero error:
> Warning: divide by zero encountered in double_scalars
>> is there a way to get a Traceback on where
Change done.
All tests pass.
Should I document the change somewhere ? Although it's a small change, I'm
guessing it could be very annoying to debug for someone depending on the
previous behavior.
2007/12/13, Travis E. Oliphant <[EMAIL PROTECTED]>:
>
> David Huard wrote:
> > Hi,
> >
> > The curr
Tony S Yu wrote:
> Hello,
>
> This is something that's been bothering for awhile. When numpy raises
> the following divide by zero error:
Warning: divide by zero encountered in double_scalars
> is there a way to get a Traceback on where that warning occurred.
In [1]: from numpy import *
In
Hello,
This is something that's been bothering for awhile. When numpy raises
the following divide by zero error:
>>> Warning: divide by zero encountered in double_scalars
is there a way to get a Traceback on where that warning occurred.
Thanks,
Tony
David Huard wrote:
> Hi,
>
> The current behavior of numpy's binary_repr is the following:
>
> >>> binary_repr(1,width=2)
> '01'
>
> >>> binary_repr(0,width=2)
> '0'
>
> This seems inconsistent and I'd suggest always padding with zeros to
> make sure that the return string always has length=width.
Thank you all for your valuable input. Learned something 'bout Numeric
again. And my problem is solved ;-).
Thanks
Christian
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion
Hi,
The current behavior of numpy's binary_repr is the following:
>>> binary_repr(1,width=2)
'01'
>>> binary_repr(0,width=2)
'0'
This seems inconsistent and I'd suggest always padding with zeros to make
sure that the return string always has length=width.
Objections ?
David
_
Thanks guys.
Stefan:
> I would guess that this is due to memory fragmentation.
Timothy:
> Your code is doing a lot of extra work and creating a lot of temporaries.
> I'd clean it up before I did anything else.
You suggestions turned out to be two sides of the same problem since
the data amounts
10 matches
Mail list logo