[Numpy-discussion] arraysetops update

2006-10-12 Thread Robert Cimrman
I have just added 'See also' to all docstrings in arraysetops functions, replaced old numpy idioms with new ones (aka modernizing) and improved speed of numpy.unique1d, which now reflects numpy.unique. hoping no bugs were introduced, regards, r. --

Re: [Numpy-discussion] AMD & UMFpack in numpy

2006-10-10 Thread Robert Cimrman
Karol Langner wrote: > Can someone give me a hint as to where in numpy the AMD and UMFpack > libraries > are used, if at all? I ask, because they have their respective sections in > site.cfg.example in the trunk. AMD and UMFpack are optional parts of scipy.linsolve, so if you do not want them

Re: [Numpy-discussion] Experience with Visit?

2006-09-15 Thread Robert Cimrman
Travis Oliphant wrote: > Has anybody had any experience with the 3-D visualization software > VISIT? It has Python bindings and seems to be pretty sophisticated. > I'm wondering why I haven't heard more about it. > > http://www.llnl.gov/visit/ No reaction up to now, so... I have just tried

Re: [Numpy-discussion] unique() should return a sorted array

2006-07-11 Thread Robert Cimrman
Norbert Nemec wrote: > unique1d is based on ediff1d, so it really calculates many differences > and compares those to 0.0 > > This is inefficient, even though this is hidden by the general > inefficiency of Python (It might be the reason for the two milliseconds, > though) > > What is more: subtr

Re: [Numpy-discussion] unique() should return a sorted array

2006-07-04 Thread Robert Cimrman
David Huard wrote: > Here is a quick benchmark between numpy's unique, unique1d and sasha's > unique: > > x = rand(10)*100 > x = x.astype('i') > > %timeit unique(x) > 10 loops, best of 3: 525 ms per loop > > %timeit unique_sasha(x) > 100 loops, best of 3: 10.7 ms per loop > > timeit unique1

Re: [Numpy-discussion] unique() should return a sorted array

2006-07-03 Thread Robert Cimrman
Sasha wrote: > On 7/2/06, Norbert Nemec <[EMAIL PROTECTED]> wrote: >> ... >> Does anybody know about the internals of the python "set"? How is >> .keys() implemented? I somehow have really doubts about the efficiency >> of this method. >> > Set implementation (Objects/setobject.c) is a copy and pas

Re: [Numpy-discussion] argsort question

2006-06-08 Thread Robert Cimrman
Charles R Harris wrote: > Robert, > > Modifying your example gives > > In [3]: import numpy as nm > > In [4]: a = nm.zeros( 1 ) > In [5]: b = nm.arange( 1 ) > In [6]: nm.alltrue( a.argsort(kind="merge" ) == b ) > Out[6]: True Thanks for all the answers! r.

Re: [Numpy-discussion] argsort question

2006-06-08 Thread Robert Cimrman
Travis Oliphant wrote: > Robert Cimrman wrote: > >>I have just lost some time to find a bug related to the fact, that >>argsort does not preserve the order of an array that is already sorted, >>see the example below. For me, it would be sufficient to mention this

[Numpy-discussion] argsort question

2006-06-08 Thread Robert Cimrman
Hi all, I have just lost some time to find a bug related to the fact, that argsort does not preserve the order of an array that is already sorted, see the example below. For me, it would be sufficient to mention this fact in the docstring, although having order preserving argsort is also an op