Re: [Numpy-discussion] Buildbot errors.

2008-05-22 Thread Charles R Harris
On Fri, May 23, 2008 at 12:10 AM, Charles R Harris < [EMAIL PROTECTED]> wrote: > The python 2.6 buildbots are showing 5 failures that are being hidden by > valgrind. > They seem to have fixed themselves, they were probably related to the API addition I made, then moved. However, it is a bad thin

[Numpy-discussion] Buildbot errors.

2008-05-22 Thread Charles R Harris
The python 2.6 buildbots are showing 5 failures that are being hidden by valgrind. Chuck ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] triangular matrix fill

2008-05-22 Thread Robert Kern
On Thu, May 22, 2008 at 9:07 PM, Charles R Harris <[EMAIL PROTECTED]> wrote: > > On Thu, May 22, 2008 at 7:19 PM, Tom Waite <[EMAIL PROTECTED]> wrote: >> >> I have a question on filling a lower triangular matrix using numpy. This >> is essentially having two loops and the inner loop upper limit is

Re: [Numpy-discussion] triangular matrix fill

2008-05-22 Thread Charles R Harris
On Thu, May 22, 2008 at 7:19 PM, Tom Waite <[EMAIL PROTECTED]> wrote: > I have a question on filling a lower triangular matrix using numpy. This > is essentially having two loops and the inner loop upper limit is the > outer loop current index. In the inner loop I have a vector being > multiplied

Re: [Numpy-discussion] C API

2008-05-22 Thread Charles R Harris
On Thu, May 22, 2008 at 6:36 PM, Travis E. Oliphant <[EMAIL PROTECTED]> wrote: > Charles R Harris wrote: > > > > > > On Thu, May 22, 2008 at 3:55 PM, Charles R Harris > > <[EMAIL PROTECTED] > wrote: > > > > > > > > On Thu, May 22, 2008 at 3:34 PM, Travis E. Oliphant >

[Numpy-discussion] triangular matrix fill

2008-05-22 Thread Tom Waite
I have a question on filling a lower triangular matrix using numpy. This is essentially having two loops and the inner loop upper limit is the outer loop current index. In the inner loop I have a vector being multiplied by a constant set in the outer loop. For a matrix N*N in size, the C the code i

Re: [Numpy-discussion] Different attributes for NumPy types

2008-05-22 Thread Travis E. Oliphant
Charles R Harris wrote: > > > On Thu, May 22, 2008 at 5:07 PM, Robert Kern <[EMAIL PROTECTED] > > wrote: > > On Thu, May 22, 2008 at 4:25 PM, Bruce Southey <[EMAIL PROTECTED] > > wrote: > > On Thu, May 22, 2008 at 2:59 PM, Robert Kern

Re: [Numpy-discussion] C API

2008-05-22 Thread Travis E. Oliphant
Charles R Harris wrote: > > > On Thu, May 22, 2008 at 3:55 PM, Charles R Harris > <[EMAIL PROTECTED] > wrote: > > > > On Thu, May 22, 2008 at 3:34 PM, Travis E. Oliphant > <[EMAIL PROTECTED] > wrote: > > Charles R Harris wrote: >

Re: [Numpy-discussion] Multiple Boolean Operations

2008-05-22 Thread Stéfan van der Walt
Hi Andrea 2008/5/23 Andrea Gavana <[EMAIL PROTECTED]>: > Thank you very much for this! I am going to try it and time it, > comparing it with the other implementations. I think I need to study a > bit your code as I know almost nothing about Cython :-D That won't be necessary -- the Fortran-implem

Re: [Numpy-discussion] C API

2008-05-22 Thread Charles R Harris
On Thu, May 22, 2008 at 3:55 PM, Charles R Harris <[EMAIL PROTECTED]> wrote: > > > On Thu, May 22, 2008 at 3:34 PM, Travis E. Oliphant < > [EMAIL PROTECTED]> wrote: > >> Charles R Harris wrote: >> > All, >> > >> > I added a function to array_api_order.txt and apparently this changed >> > the order

Re: [Numpy-discussion] Different attributes for NumPy types

2008-05-22 Thread Charles R Harris
On Thu, May 22, 2008 at 5:07 PM, Robert Kern <[EMAIL PROTECTED]> wrote: > On Thu, May 22, 2008 at 4:25 PM, Bruce Southey <[EMAIL PROTECTED]> wrote: > > On Thu, May 22, 2008 at 2:59 PM, Robert Kern <[EMAIL PROTECTED]> > wrote: > >> On Thu, May 22, 2008 at 2:46 PM, Charles R Harris > >> <[EMAIL PROT

Re: [Numpy-discussion] Different attributes for NumPy types

2008-05-22 Thread Robert Kern
On Thu, May 22, 2008 at 4:25 PM, Bruce Southey <[EMAIL PROTECTED]> wrote: > On Thu, May 22, 2008 at 2:59 PM, Robert Kern <[EMAIL PROTECTED]> wrote: >> On Thu, May 22, 2008 at 2:46 PM, Charles R Harris >> <[EMAIL PROTECTED]> wrote: >>> It also leads to various inconsistencies: >>> >>> In [1]: float3

Re: [Numpy-discussion] Multiple Boolean Operations

2008-05-22 Thread Andrea Gavana
Hi Stefan, On Thu, May 22, 2008 at 10:23 PM, Stéfan van der Walt wrote: > Hi Andrea > > 2008/5/22 Andrea Gavana <[EMAIL PROTECTED]>: >> By the way, about the solution Francesc posted: >> >> xyzReq = (xCent >= xMin) & (xCent <= xMax) & \ >>(yCent >= yMin) & (yCent <= yMax) & \ >>

Re: [Numpy-discussion] Multiple Boolean Operations

2008-05-22 Thread Andrea Gavana
Hi Chris and All, On Thu, May 22, 2008 at 8:40 PM, Christopher Barker wrote: > Andrea Gavana wrote: >> By the way, about the solution Francesc posted: >> >> xyzReq = (xCent >= xMin) & (xCent <= xMax) & \ >> (yCent >= yMin) & (yCent <= yMax) & \ >> (zCent >= zMin) & (zCent

Re: [Numpy-discussion] Multiple Boolean Operations

2008-05-22 Thread Christopher Barker
Stéfan van der Walt wrote: > I wrote a quick proof of concept (no guarantees). Thanks for the example -- I like how Cython understands ndarrays! It looks like this code would break if x,y,and z are not C-contiguous -- should there be a check for that? -Chris > here (download using bzr, http:

Re: [Numpy-discussion] C API

2008-05-22 Thread Charles R Harris
On Thu, May 22, 2008 at 3:34 PM, Travis E. Oliphant <[EMAIL PROTECTED]> wrote: > Charles R Harris wrote: > > All, > > > > I added a function to array_api_order.txt and apparently this changed > > the order of the pointers in the API, which caused ctypes to segfault > > until I removed the build di

Re: [Numpy-discussion] C API

2008-05-22 Thread Travis E. Oliphant
Charles R Harris wrote: > All, > > I added a function to array_api_order.txt and apparently this changed > the order of the pointers in the API, which caused ctypes to segfault > until I removed the build directory and did a complete rebuild. It > seems to me that if we really want to make addin

Re: [Numpy-discussion] Different attributes for NumPy types

2008-05-22 Thread Bruce Southey
On Thu, May 22, 2008 at 2:59 PM, Robert Kern <[EMAIL PROTECTED]> wrote: > On Thu, May 22, 2008 at 2:46 PM, Charles R Harris > <[EMAIL PROTECTED]> wrote: >> It also leads to various inconsistencies: >> >> In [1]: float32(array([[1]])) >> Out[1]: array([[ 1.]], dtype=float32) >> >> In [2]: float64(ar

Re: [Numpy-discussion] Multiple Boolean Operations

2008-05-22 Thread Stéfan van der Walt
Hi Andrea 2008/5/22 Andrea Gavana <[EMAIL PROTECTED]>: > By the way, about the solution Francesc posted: > > xyzReq = (xCent >= xMin) & (xCent <= xMax) & \ >(yCent >= yMin) & (yCent <= yMax) & \ >(zCent >= zMin) & (zCent <= zMax) > > xyzReq = numpy.nonzero(xyzReq)[0] > >

Re: [Numpy-discussion] numpy.ndarray.astype conversion

2008-05-22 Thread Charles R Harris
On Thu, May 22, 2008 at 2:52 PM, Orest Kozyar <[EMAIL PROTECTED]> wrote: > The following line: array([6.95e-5]).astype('S') > returns: array(['6'], dtype='|S1') > > I realize that I can get it to return the correct string > representation if I specify 'S12', etc, but anything below 'S9' > results

[Numpy-discussion] numpy.ndarray.astype conversion

2008-05-22 Thread Orest Kozyar
The following line: array([6.95e-5]).astype('S') returns: array(['6'], dtype='|S1') I realize that I can get it to return the correct string representation if I specify 'S12', etc, but anything below 'S9' results in an incorrect string representation of the number. Is this expected behavior? Th

Re: [Numpy-discussion] Multiple Boolean Operations

2008-05-22 Thread Nathan Bell
On Thu, May 22, 2008 at 2:16 PM, Andrea Gavana <[EMAIL PROTECTED]> wrote: > By the way, about the solution Francesc posted: > > xyzReq = (xCent >= xMin) & (xCent <= xMax) & \ >(yCent >= yMin) & (yCent <= yMax) & \ >(zCent >= zMin) & (zCent <= zMax) > You could implement t

Re: [Numpy-discussion] Different attributes for NumPy types

2008-05-22 Thread Robert Kern
On Thu, May 22, 2008 at 2:46 PM, Charles R Harris <[EMAIL PROTECTED]> wrote: > It also leads to various inconsistencies: > > In [1]: float32(array([[1]])) > Out[1]: array([[ 1.]], dtype=float32) > > In [2]: float64(array([[1]])) > Out[2]: 1.0 Okay, so don't do that. Always use x.astype(dtype) or a

Re: [Numpy-discussion] Different attributes for NumPy types

2008-05-22 Thread Charles R Harris
On Thu, May 22, 2008 at 1:32 PM, Bruce Southey <[EMAIL PROTECTED]> wrote: > Hi, > Thanks very much for the confirmation. > > Bruce > > On Thu, May 22, 2008 at 2:09 PM, Robert Kern <[EMAIL PROTECTED]> > wrote: > > On Thu, May 22, 2008 at 10:24 AM, Travis E. Oliphant > > <[EMAIL PROTECTED]> wrote: >

Re: [Numpy-discussion] Multiple Boolean Operations

2008-05-22 Thread Christopher Barker
Andrea Gavana wrote: > By the way, about the solution Francesc posted: > > xyzReq = (xCent >= xMin) & (xCent <= xMax) & \ > (yCent >= yMin) & (yCent <= yMax) & \ > (zCent >= zMin) & (zCent <= zMax) > > xyzReq = numpy.nonzero(xyzReq)[0] > > Do you think is there any chan

Re: [Numpy-discussion] Different attributes for NumPy types

2008-05-22 Thread Bruce Southey
Hi, Thanks very much for the confirmation. Bruce On Thu, May 22, 2008 at 2:09 PM, Robert Kern <[EMAIL PROTECTED]> wrote: > On Thu, May 22, 2008 at 10:24 AM, Travis E. Oliphant > <[EMAIL PROTECTED]> wrote: >> Bruce Southey wrote: >>> Hi, >>> Is it bug if different NumPy types have different attrib

Re: [Numpy-discussion] Multiple Boolean Operations

2008-05-22 Thread Andrea Gavana
Hi All, On Thu, May 22, 2008 at 7:46 PM, Robert Kern wrote: > On Thu, May 22, 2008 at 12:26 PM, Stéfan van der Walt <[EMAIL PROTECTED]> > wrote: >> Just to clarify things in my mind: is VTK *that* slow? I find that >> surprising, since it is written in C or C++. > > Performance can depend more

[Numpy-discussion] C API

2008-05-22 Thread Charles R Harris
All, I added a function to array_api_order.txt and apparently this changed the order of the pointers in the API, which caused ctypes to segfault until I removed the build directory and did a complete rebuild. It seems to me that if we really want to make adding these API functions safe, then we sh

Re: [Numpy-discussion] Different attributes for NumPy types

2008-05-22 Thread Robert Kern
On Thu, May 22, 2008 at 10:24 AM, Travis E. Oliphant <[EMAIL PROTECTED]> wrote: > Bruce Southey wrote: >> Hi, >> Is it bug if different NumPy types have different attributes? >> > I don't think so, other than perhaps we should not have the Python types > in the numpy namespace. > > numpy.float is j

Re: [Numpy-discussion] workaround for searchsorted with strings?

2008-05-22 Thread Charles R Harris
On Thu, May 22, 2008 at 12:36 PM, Lewis Hyatt <[EMAIL PROTECTED]> wrote: > Oh sorry, my example was dumb, never mind. It looks like this way does work > after all. Can someone please confirm for me, though, that the workaround I > am > using (just changing to the wider string type) is reliable? Th

Re: [Numpy-discussion] new numpy docs, missing function and parse error - dirichlet distribution

2008-05-22 Thread Pauli Virtanen
to, 2008-05-22 kello 11:28 -0700, joep kirjoitti: [clip] > However, when I do a search on the DocWiki for example for arccos (or > log, log10, exp, tan,...), I see it 9 times, and it is not clear which > ones refer to the same docstring and where several imports of the same > function are picked up

Re: [Numpy-discussion] Multiple Boolean Operations

2008-05-22 Thread Robert Kern
On Thu, May 22, 2008 at 12:26 PM, Stéfan van der Walt <[EMAIL PROTECTED]> wrote: > Just to clarify things in my mind: is VTK *that* slow? I find that > surprising, since it is written in C or C++. Performance can depend more on the design of the code than the implementation language. There are se

[Numpy-discussion] buglet: Dirichlet missing in numpy.random.__all__ as defined in numpy/random/info.py

2008-05-22 Thread joep
The Dirichlet distribution is missing in __all__ in http://projects.scipy.org/scipy/numpy/browser/trunk/numpy/random/info.py As a consequence numpy.lookfor does not find Dirichlet >>> numpy.lookfor('dirichlet') Search results for 'dirichlet' -- >>> import numpy.random

Re: [Numpy-discussion] workaround for searchsorted with strings?

2008-05-22 Thread Charles R Harris
On Thu, May 22, 2008 at 12:29 PM, Lewis Hyatt <[EMAIL PROTECTED]> wrote: > Hello- > > I see from this thread: > http://article.gmane.org/gmane.comp.python.numeric.general/18746/ > > that searchsorted does not work correctly with strings. Is there a > workaround, > though, that I can use with 1.0.4

Re: [Numpy-discussion] workaround for searchsorted with strings?

2008-05-22 Thread Lewis Hyatt
Oh sorry, my example was dumb, never mind. It looks like this way does work after all. Can someone please confirm for me, though, that the workaround I am using (just changing to the wider string type) is reliable? Thanks, sorry for the noise. -Lewis

[Numpy-discussion] workaround for searchsorted with strings?

2008-05-22 Thread Lewis Hyatt
Hello- I see from this thread: http://article.gmane.org/gmane.comp.python.numeric.general/18746/ that searchsorted does not work correctly with strings. Is there a workaround, though, that I can use with 1.0.4 until there is a new official numpy release that includes the fix mentioned in the ref

Re: [Numpy-discussion] new numpy docs, missing function and parse error - dirichlet distribution

2008-05-22 Thread joep
On May 22, 1:30 pm, Pauli Virtanen <[EMAIL PROTECTED]> wrote: > to, 2008-05-22 kello 09:51 -0700, joep kirjoitti: > >  > It is not intentional. And for the majority of cases this does not > happen, and I can fix this for numpy.random.mtrand. Thanks for > reporting. > I was looking some more at

Re: [Numpy-discussion] osX leopard linker setting

2008-05-22 Thread Robert Kern
On Thu, May 22, 2008 at 1:22 PM, Thomas Hrabe <[EMAIL PROTECTED]> wrote: > Hi, > > does anybody know the linker settings for python c modules on osX ? > i have the original xcode3 tools installed -> gcc 4.0.1 Just use distutils (or numpy.distutils). It will take care of the linker flags for you. I

Re: [Numpy-discussion] osX leopard linker setting

2008-05-22 Thread Thomas Hrabe
By the way, whats a lazy pointer anyway? -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] im Auftrag von Thomas Hrabe Gesendet: Do 22.05.2008 11:22 An: numpy-discussion@scipy.org Betreff: [Numpy-discussion] osX leopard linker setting Hi, does anybody know the linker settings for python

[Numpy-discussion] osX leopard linker setting

2008-05-22 Thread Thomas Hrabe
Hi, does anybody know the linker settings for python c modules on osX ? i have the original xcode3 tools installed -> gcc 4.0.1 I use '-bundle -flat_namespace' for linking now, but I get ld: can't insert lazy pointers, __dyld section not found for inferred architecture ppc Does anybody know

Re: [Numpy-discussion] new numpy docs, missing function and parse error - dirichlet distribution

2008-05-22 Thread Pauli Virtanen
to, 2008-05-22 kello 09:51 -0700, joep kirjoitti: > > On May 22, 11:11 am, joep <[EMAIL PROTECTED]> wrote: > > Hi, > > > When looking for this, I found that the Dirichlet distribution is > > missing from the new Docstring > > Wiki,http://sd-2116.dedibox.fr/doc/Docstrings/numpy/random > > Actual

Re: [Numpy-discussion] Multiple Boolean Operations

2008-05-22 Thread Stéfan van der Walt
Hi Andrea 2008/5/22 Andrea Gavana <[EMAIL PROTECTED]>: >> You clearly have a large dataset, otherwise speed wouldn't have been a >> concern to you. You can do your operation in one pass over the data, >> and I'd suggest you try doing that with Cython or Ctypes. If you need >> an example on how t

Re: [Numpy-discussion] new numpy docs, missing function and parse error - dirichlet distribution

2008-05-22 Thread joep
On May 22, 11:11 am, joep <[EMAIL PROTECTED]> wrote: > Hi, > When looking for this, I found that the Dirichlet distribution is > missing from the new Docstring > Wiki,http://sd-2116.dedibox.fr/doc/Docstrings/numpy/random Actually, a search on the wiki finds dirichlet in http://sd-2116.dedibox.

Re: [Numpy-discussion] Fancier indexing

2008-05-22 Thread Keith Goodman
On Thu, May 22, 2008 at 9:22 AM, Robin <[EMAIL PROTECTED]> wrote: > On Thu, May 22, 2008 at 4:59 PM, Kevin Jacobs <[EMAIL PROTECTED]> > <[EMAIL PROTECTED]> wrote: >> After poking around for a bit, I was wondering if there was a faster method >> for the following: >> >> # Array of index values 0..n

Re: [Numpy-discussion] Fancier indexing

2008-05-22 Thread Robin
On Thu, May 22, 2008 at 4:59 PM, Kevin Jacobs <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> wrote: > After poking around for a bit, I was wondering if there was a faster method > for the following: > > # Array of index values 0..n > items = numpy.array([0,3,2,1,4,2],dtype=int) > > # Count the number of o

Re: [Numpy-discussion] Fancier indexing

2008-05-22 Thread Keith Goodman
On Thu, May 22, 2008 at 9:15 AM, Keith Goodman <[EMAIL PROTECTED]> wrote: > On Thu, May 22, 2008 at 9:08 AM, Keith Goodman <[EMAIL PROTECTED]> wrote: >> On Thu, May 22, 2008 at 8:59 AM, Kevin Jacobs <[EMAIL PROTECTED]> >> <[EMAIL PROTECTED]> wrote: >>> After poking around for a bit, I was wondering

Re: [Numpy-discussion] Fancier indexing

2008-05-22 Thread Mark Miller
You're just trying to do this...correct? >>> import numpy >>> items = numpy.array([0,3,2,1,4,2],dtype=int) >>> unique = numpy.unique(items) >>> unique array([0, 1, 2, 3, 4]) >>> counts=numpy.histogram(items,unique) >>> counts (array([1, 1, 2, 1, 1]), array([0, 1, 2, 3, 4])) >>> counts[0] array([1,

Re: [Numpy-discussion] Fancier indexing

2008-05-22 Thread Keith Goodman
On Thu, May 22, 2008 at 9:08 AM, Keith Goodman <[EMAIL PROTECTED]> wrote: > On Thu, May 22, 2008 at 8:59 AM, Kevin Jacobs <[EMAIL PROTECTED]> > <[EMAIL PROTECTED]> wrote: >> After poking around for a bit, I was wondering if there was a faster method >> for the following: >> >> # Array of index valu

Re: [Numpy-discussion] Fancier indexing

2008-05-22 Thread Kevin Jacobs <[EMAIL PROTECTED]>
On Thu, May 22, 2008 at 12:08 PM, Keith Goodman <[EMAIL PROTECTED]> wrote: > How big is n? If it is much smaller than a million then loop over that > instead. > n is always relatively small, but I'd rather not do: for i in range(n): counts[i] = (items==i).sum() If that was the best alternativ

Re: [Numpy-discussion] Fancier indexing

2008-05-22 Thread Keith Goodman
On Thu, May 22, 2008 at 8:59 AM, Kevin Jacobs <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> wrote: > After poking around for a bit, I was wondering if there was a faster method > for the following: > > # Array of index values 0..n > items = numpy.array([0,3,2,1,4,2],dtype=int) > > # Count the number of o

[Numpy-discussion] Fancier indexing

2008-05-22 Thread Kevin Jacobs <[EMAIL PROTECTED]>
After poking around for a bit, I was wondering if there was a faster method for the following: # Array of index values 0..n items = numpy.array([0,3,2,1,4,2],dtype=int) # Count the number of occurrences of each index counts = numpy.zeros(5, dtype=int) for i in items: counts[i] += 1 In my real

Re: [Numpy-discussion] Different attributes for NumPy types

2008-05-22 Thread Travis E. Oliphant
Bruce Southey wrote: > Hi, > Is it bug if different NumPy types have different attributes? > I don't think so, other than perhaps we should not have the Python types in the numpy namespace. numpy.float is just __builtin__.float which is a Python type not a NumPy data-type object. numpy.flo

[Numpy-discussion] new numpy docs, missing function and parse error - dirichlet distribution

2008-05-22 Thread joep
Hi, I was just looking around at the new numpy documentation and got a xhtml parsing error on the page (with Firefox): http://mentat.za.net/numpy/refguide/random.xhtml#index-29351 The offending line contains $X pprox prod_{i=1}^{k}{x^{lpha_i-1}_i}$< in the docstring of the dirichlet distributio

[Numpy-discussion] Different attributes for NumPy types

2008-05-22 Thread Bruce Southey
Hi, Is it bug if different NumPy types have different attributes? Based on prior discussion, 'complex', 'float' and 'int' are Python types and others are NumPy types. Consequently 'complex', 'float' and 'int' do not inherit from NumPy. However, an element from array created using dtype=numpy.f

Re: [Numpy-discussion] Multiple Boolean Operations

2008-05-22 Thread Travis E. Oliphant
Alan G Isaac wrote: > On Thu, 22 May 2008, Andrea Gavana apparently wrote: > >> # Filter cells which do not satisfy Z requirements: >> zReq = zMin <= zCent <= zMax >> > > This seems to raise a question: > should numpy arrays support this standard Python idiom? > It would be nice, but al

Re: [Numpy-discussion] ANN: NumPy/SciPy Documentation Marathon 2008

2008-05-22 Thread Bruce Southey
Stéfan van der Walt wrote: > It looks like there is significant interest in using "np" instead of > "numpy" in the examples (i.e. we expect the user to do "import numpy > as np" before trying code snippets). > > Would anybody who objects to using "np" raise it now, so that we can > bury this issue?

Re: [Numpy-discussion] Multiple Boolean Operations

2008-05-22 Thread Andrea Gavana
Hi Francesc & All, On Thu, May 22, 2008 at 1:04 PM, Francesc Alted wrote: > I don't know if this is what you want, but you can get the boolean > arrays separately, do the intersection and finally get the interesting > values (by using fancy indexing) or coordinates (by using .nonzero()). > Here it

Re: [Numpy-discussion] Multiple Boolean Operations

2008-05-22 Thread Angus McMorland
2008/5/22 Andrea Gavana <[EMAIL PROTECTED]>: > Hi All, > >I am building some 3D grids for visualization starting from a much > bigger grid. I build these grids by satisfying certain conditions on > x, y, z coordinates of their cells: up to now I was using VTK to > perform this operation, but VT

Re: [Numpy-discussion] Multiple Boolean Operations

2008-05-22 Thread Alan G Isaac
On Thu, 22 May 2008, Andrea Gavana apparently wrote: > # Filter cells which do not satisfy Z requirements: > zReq = zMin <= zCent <= zMax This seems to raise a question: should numpy arrays support this standard Python idiom? Cheers, Alan Isaac ___

Re: [Numpy-discussion] Multiple Boolean Operations

2008-05-22 Thread Francesc Alted
A Thursday 22 May 2008, Andrea Gavana escrigué: > Hi All, > > I am building some 3D grids for visualization starting from a > much bigger grid. I build these grids by satisfying certain > conditions on x, y, z coordinates of their cells: up to now I was > using VTK to perform this operation, bu

Re: [Numpy-discussion] Multiple Boolean Operations

2008-05-22 Thread Andrea Gavana
Hi Stefan & All, On Thu, May 22, 2008 at 12:29 PM, Stéfan van der Walt wrote: > Hi Andrea > > 2008/5/22 Andrea Gavana <[EMAIL PROTECTED]>: >>I am building some 3D grids for visualization starting from a much >> bigger grid. I build these grids by satisfying certain conditions on >> x, y, z coo

Re: [Numpy-discussion] Multiple Boolean Operations

2008-05-22 Thread Stéfan van der Walt
Hi Andrea 2008/5/22 Andrea Gavana <[EMAIL PROTECTED]>: >I am building some 3D grids for visualization starting from a much > bigger grid. I build these grids by satisfying certain conditions on > x, y, z coordinates of their cells: up to now I was using VTK to > perform this operation, but VTK

[Numpy-discussion] Multiple Boolean Operations

2008-05-22 Thread Andrea Gavana
Hi All, I am building some 3D grids for visualization starting from a much bigger grid. I build these grids by satisfying certain conditions on x, y, z coordinates of their cells: up to now I was using VTK to perform this operation, but VTK is slow as a turtle, so I thought to use numpy to get

Re: [Numpy-discussion] ANN: NumPy/SciPy Documentation Marathon 2008

2008-05-22 Thread Stéfan van der Walt
It looks like there is significant interest in using "np" instead of "numpy" in the examples (i.e. we expect the user to do "import numpy as np" before trying code snippets). Would anybody who objects to using "np" raise it now, so that we can bury this issue? Regards Stéfan 2008/5/22 Rob Hetlan

Re: [Numpy-discussion] distance_matrix: how to speed up?

2008-05-22 Thread Vincent Schut
Rob Hetland wrote: > On May 22, 2008, at 9:45 AM, Vincent Schut wrote: > > > Really, though, the rbf toolbox will not be limited by the memory of > the distance matrix. Later on, you need to do a large linear algebra > 'solve', like this: > > > r = norm(x, x) # The distances between all o

Re: [Numpy-discussion] Numpy and scipy icons ?

2008-05-22 Thread Charles R Harris
On Thu, May 22, 2008 at 4:14 AM, David Cournapeau < [EMAIL PROTECTED]> wrote: > Stéfan van der Walt wrote: > > Hi David > > > > The icons are attached to the scipy.org main page as .png's. Travis > > Vaught drew the vector versions, IIRC. > > > > I can find logo for scipy conf, bug, etc... but no

Re: [Numpy-discussion] Numpy and scipy icons ?

2008-05-22 Thread David Cournapeau
Stéfan van der Walt wrote: > Hi David > > The icons are attached to the scipy.org main page as .png's. Travis > Vaught drew the vector versions, IIRC. > I can find logo for scipy conf, bug, etc... but no "normal" icon, nor any numpy icon. Would it be possible to put the icon (vector version)

Re: [Numpy-discussion] ANN: NumPy/SciPy Documentation Marathon 2008

2008-05-22 Thread Rob Hetland
On May 22, 2008, at 11:37 AM, Pauli Virtanen wrote: > Or should we "assume from numpy import *" or "import numpy as np"? I Although a good case could probably be made for all three (*, np, numpy), I think that if "import numpy as np" is to be put forward as the standard coding style, the ex

Re: [Numpy-discussion] distance_matrix: how to speed up?

2008-05-22 Thread Rob Hetland
On May 22, 2008, at 9:45 AM, Vincent Schut wrote: > Reading this thread, I remembered having tried scipy's sandbox.rbf > (radial basis function) to interpolate a pretty large, > multidimensional > dataset, to fill in the missing data points. This however failed soon > with out-of-memory errors,

Re: [Numpy-discussion] Numpy and scipy icons ?

2008-05-22 Thread Stéfan van der Walt
Hi David The icons are attached to the scipy.org main page as .png's. Travis Vaught drew the vector versions, IIRC. Regards Stéfan 2008/5/22 David Cournapeau <[EMAIL PROTECTED]>: > Hi, > >Where can I find numpy and scipy icons, preferably in a vector format ? > >cheers, > >David ___

[Numpy-discussion] Numpy and scipy icons ?

2008-05-22 Thread David Cournapeau
Hi, Where can I find numpy and scipy icons, preferably in a vector format ? cheers, David ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] ANN: NumPy/SciPy Documentation Marathon 2008

2008-05-22 Thread Pauli Virtanen
ke, 2008-05-21 kello 10:08 +0200, Stéfan van der Walt kirjoitti: [clip] > > This will parse better (as the line with the semicolon is bold, the > > next lines are not). Also, would it be possible to put function and > > next_function in double back-ticks, so that they are referenced, like > > modu

Re: [Numpy-discussion] distance_matrix: how to speed up?

2008-05-22 Thread Vincent Schut
Emanuele Olivetti wrote: > > This solution is super-fast, stable and use little memory. > It is based on the fact that: > (x-y)^2*w = x*x*w - 2*x*y*w + y*y*w > > For size1=size2=dimensions=1000 requires ~0.6sec. to compute > on my dual core duo. It is 2 order of magnitude faster than my > previo

Re: [Numpy-discussion] first recarray steps

2008-05-22 Thread Vincent Schut
Anne Archibald wrote: > 2008/5/21 Vincent Schut <[EMAIL PROTECTED]>: >> Christopher Barker wrote: >>> Also, if you image data is rgb, usually, that's a (width, height, 3) >>> array: rgbrgbrgbrgb... in memory. If you have a (3, width, height) >>> array, then that's rrr...

Re: [Numpy-discussion] Closing some tickets.

2008-05-22 Thread David Cournapeau
Matthieu Brucher wrote: > Hi, > > Is there an official support for MSVC 2005 ? Last time I tried to > compile Python with it, it couldn't build extension. If MSVC 2005 is > not officially supported, at least by Python itself, I'm not sure > Numpy can. Python 2.5 used 2003 (VS 7 ? I am always co