Re: [Numpy-discussion] Error building docs

2009-09-28 Thread Pauli Virtanen
Fri, 25 Sep 2009 12:29:30 -0400, Michael Droettboom wrote: Anybody know why I might be seeing this? [clip] Exception occurred:[ 0%] reference/arrays.classeslass File /home/mdroe/usr/lib/python2.5/site-packages/docutils/nodes.py, line 471, in __getitem__ return self.attributes[key]

[Numpy-discussion] numpy.numarray.transpose()

2009-09-28 Thread Michael . Walker
Hello list, I just thought I'd point out a difference between 'import numarray' and 'import numpy.numarray' . Consider the following In [1]: from numpy.numarray import * In [2]: d = array((1,2,3,4)) In [3]: f = reshape(d,(2,2)) In [4]: print f [[1 2] [3 4]] In [5]: f.transpose() Out[5]:

[Numpy-discussion] new array type in cython?

2009-09-28 Thread Neal Becker
Has anyone attempted a new array type in cython? Any hints? ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

[Numpy-discussion] glumpy: fast OpenGL numpy visualization + matplotlib integration

2009-09-28 Thread Nicolas Rougier
Hi all, glumpy is a fast OpenGL visualization tool for numpy arrays coded on top of pyglet (http://www.pyglet.org/). The package contains many demos showing basic usage as well as integration with matplotlib. As a reference, the animation script available from matplotlib distribution

Re: [Numpy-discussion] numpy.numarray.transpose()

2009-09-28 Thread Bruce Southey
On 09/28/2009 03:15 AM, Pauli Virtanen wrote: Mon, 28 Sep 2009 10:07:47 +0200, Michael.Walker wrote: [clip] In [7]: f = f.transpose() In [8]: print f [[1 3] [2 4]] as expected. I mention this because I think that it is worth knowing having lost a LOT of time to it. Is it worth

Re: [Numpy-discussion] numpy.numarray.transpose()

2009-09-28 Thread Pauli Virtanen
Mon, 28 Sep 2009 09:29:30 -0500, Bruce Southey wrote: [clip] This is not a bug! This specific difference between numpy and numarray is documented on the 'converting from numarray' page: http://www.scipy.org/Converting_from_numarray Oh. I completely missed that page. Now, it should just be

Re: [Numpy-discussion] new array type in cython?

2009-09-28 Thread Robert Kern
On Mon, Sep 28, 2009 at 06:23, Neal Becker ndbeck...@gmail.com wrote: Has anyone attempted a new array type in cython?  Any hints? Are you having problems? -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt

Re: [Numpy-discussion] new array type in cython?

2009-09-28 Thread Neal Becker
Robert Kern wrote: On Mon, Sep 28, 2009 at 06:23, Neal Becker ndbeck...@gmail.com wrote: Has anyone attempted a new array type in cython? Any hints? Are you having problems? No, haven't tried using cython for this yet. Wondering if there are any examples. So far my experiences have

Re: [Numpy-discussion] new array type in cython?

2009-09-28 Thread Robert Kern
On Mon, Sep 28, 2009 at 10:36, Neal Becker ndbeck...@gmail.com wrote: Robert Kern wrote: On Mon, Sep 28, 2009 at 06:23, Neal Becker ndbeck...@gmail.com wrote: Has anyone attempted a new array type in cython?  Any hints? Are you having problems? No, haven't tried using cython for this yet.  

Re: [Numpy-discussion] [Matplotlib-users] glumpy: fast OpenGL numpy visualization + matplotlib integration

2009-09-28 Thread Nicolas Rougier
Well, I've been starting working on a pyglet backend but it is currently painfully slow mainly because I do not know enough of the matplotlib internal machinery to really benefit from it. In the case of glumpy, the use of texture object for representing 2d arrays is a real speed boost

Re: [Numpy-discussion] unpacking bytes directly in numpy

2009-09-28 Thread Christopher Barker
David Cournapeau wrote: However, is there a more direct way of directly transforming bytes into a np.int32 type without the intermediate 'struct.unpack' step? Assuming you have an array of bytes, you could just use view: # x is an array of bytes, whose length is a multiple of 4

Re: [Numpy-discussion] Question about improving genfromtxt errors

2009-09-28 Thread Christopher Barker
Skipper Seabold wrote: FWIW, I have a script that creates and savez arrays from several text files in total about 1.5 GB of text. without the incrementing in genfromtxt Run time: 122.043943 seconds with the incrementing in genfromtxt Run time: 131.698873 seconds If we just want to

Re: [Numpy-discussion] Question about improving genfromtxt errors

2009-09-28 Thread Skipper Seabold
On Mon, Sep 28, 2009 at 12:41 PM, Christopher Barker chris.bar...@noaa.gov wrote: Skipper Seabold wrote: FWIW, I have a script that creates and savez arrays from several text files in total about 1.5 GB of text. without the incrementing in genfromtxt Run time: 122.043943 seconds with the

Re: [Numpy-discussion] [Matplotlib-users] glumpy: fast OpenGL numpy visualization + matplotlib integration

2009-09-28 Thread Rohit Garg
This is good. I have been looking forward to seeing something like this for a while. I'd be cool however, to dump a *real* python function into a vertex shader and let it do real mesh deformations. I know, it would be hard to validate if it wasn;t doing some crazy stuff. Of course, with new (ie

Re: [Numpy-discussion] Question about improving genfromtxt errors

2009-09-28 Thread Pierre GM
On Sep 28, 2009, at 12:51 PM, Skipper Seabold wrote: This was probably due to the way that I timed it, honestly. I only did it once. The only differences I made for that part were in the first post of the thread. Two incremented scalars for line numbers and column numbers and a try/except

Re: [Numpy-discussion] Question about improving genfromtxt errors

2009-09-28 Thread Skipper Seabold
On Mon, Sep 28, 2009 at 1:36 PM, Pierre GM pgmdevl...@gmail.com wrote: On Sep 28, 2009, at 12:51 PM, Skipper Seabold wrote: This was probably due to the way that I timed it, honestly.  I only did it once.  The only differences I made for that part were in the first post of the thread.  Two

Re: [Numpy-discussion] new array type in cython?

2009-09-28 Thread Charles R Harris
On Mon, Sep 28, 2009 at 10:47 AM, Neal Becker ndbeck...@gmail.com wrote: Robert Kern wrote: On Mon, Sep 28, 2009 at 10:36, Neal Becker ndbeck...@gmail.com wrote: Robert Kern wrote: On Mon, Sep 28, 2009 at 06:23, Neal Becker ndbeck...@gmail.com wrote: Has anyone attempted a new array

[Numpy-discussion] setup.py does not use the correct library

2009-09-28 Thread Peng Yu
I use the following command to build numpy-1.3.0rc2. But it seems not able to find the appropriate library files. Can somebody let me know how to make it use the correct ones? #command export LD_LBRARY_PATH= export CPPFLAGS=-I$HOME/utility/linux/opt/Python-2.6.2/include/python2.6 export

Re: [Numpy-discussion] setup.py does not use the correct library

2009-09-28 Thread Robert Kern
On Mon, Sep 28, 2009 at 14:31, Peng Yu pengyu...@gmail.com wrote: I use the following command to build numpy-1.3.0rc2. But it seems not able to find the appropriate library files. Can somebody let me know how to make it use the correct ones? #command export LD_LBRARY_PATH= export

[Numpy-discussion] numpy.reshape() bug?

2009-09-28 Thread Chris
I am trying to collapse two dimensions of a 3-D array, using reshape: (Pdb) dims = np.shape(trace) (Pdb) dims Out[2]: (1000, 4, 3) (Pdb) newdims = (dims[0], sum(dims[1:])) (Pdb) newdims Out[2]: (1000, 7) However, reshape seems to think I am missing something: (Pdb) np.reshape(trace, newdims)

[Numpy-discussion] Deprecate poly1d and replace with Poly1d ?

2009-09-28 Thread Charles R Harris
Because poly1d exports the __array__ interface, a design error IMHO that makes it play badly with the prospective chebyshev module. For example the following should convert from a Chebyshev series to a power series chebval([1,0,0], poly1d(1,0)) and it does if I make sure to pass the poly1d as

Re: [Numpy-discussion] numpy.reshape() bug?

2009-09-28 Thread Neil Martinsen-Burrell
On 2009-09-28 15:39 , Chris wrote: I am trying to collapse two dimensions of a 3-D array, using reshape: (Pdb) dims = np.shape(trace) (Pdb) dims Out[2]: (1000, 4, 3) (Pdb) newdims = (dims[0], sum(dims[1:])) (Pdb) newdims Out[2]: (1000, 7) However, reshape seems to think I am missing

Re: [Numpy-discussion] Deprecate poly1d and replace with Poly1d ?

2009-09-28 Thread Robert Kern
On Mon, Sep 28, 2009 at 15:46, Charles R Harris charlesr.har...@gmail.com wrote: The more basic problem here is making poly1d look like an array, which it isn't. The array bit is an implementation detail and would be private in C++. with an as_array method to retrieve the details if wanted.

[Numpy-discussion] The problem with zero dimesnsional array

2009-09-28 Thread yogesh karpate
Dear All, I'm facing a bog problem in following . the code snippet is as follows % Compute the area indicator### for kT in range(leftbound,rightbound): # Here the left bound and rightbound both are indexing array is

Re: [Numpy-discussion] Deprecate poly1d and replace with Poly1d ?

2009-09-28 Thread Charles R Harris
On Mon, Sep 28, 2009 at 2:59 PM, Robert Kern robert.k...@gmail.com wrote: On Mon, Sep 28, 2009 at 15:46, Charles R Harris charlesr.har...@gmail.com wrote: The more basic problem here is making poly1d look like an array, which it isn't. The array bit is an implementation detail and would be

Re: [Numpy-discussion] setup.py does not use the correct library

2009-09-28 Thread Peng Yu
On Mon, Sep 28, 2009 at 2:53 PM, Robert Kern robert.k...@gmail.com wrote: On Mon, Sep 28, 2009 at 14:31, Peng Yu pengyu...@gmail.com wrote: I use the following command to build numpy-1.3.0rc2. But it seems not able to find the appropriate library files. Can somebody let me know how to make it

Re: [Numpy-discussion] setup.py does not use the correct library

2009-09-28 Thread Robert Kern
On Mon, Sep 28, 2009 at 16:27, Peng Yu pengyu...@gmail.com wrote: On Mon, Sep 28, 2009 at 2:53 PM, Robert Kern robert.k...@gmail.com wrote: On Mon, Sep 28, 2009 at 14:31, Peng Yu pengyu...@gmail.com wrote: I use the following command to build numpy-1.3.0rc2. But it seems not able to find the

Re: [Numpy-discussion] setup.py does not use the correct library

2009-09-28 Thread Robert Kern
On Mon, Sep 28, 2009 at 16:40, Peng Yu pengyu...@gmail.com wrote: I attached the script that I run for build and the build output. I think that setup.py doesn't use the correct python library. But I'm not sure why. Would you please help me figure out what the problem is? Setting $LDFLAGS to be

[Numpy-discussion] Convert data into rectangular grid

2009-09-28 Thread jah
Hi, Suppose I have a set of x,y,c data (something useful for matplotlib.pyplot.plot() ). Generally, this data is not rectangular at all. Does there exist a numpy function (or set of functions) which will take this data and construct the smallest two-dimensional arrays X,Y,C ( suitable for

Re: [Numpy-discussion] setup.py does not use the correct library

2009-09-28 Thread Robert Kern
On Mon, Sep 28, 2009 at 19:35, Peng Yu pengyu...@gmail.com wrote: On Mon, Sep 28, 2009 at 4:44 PM, Robert Kern robert.k...@gmail.com wrote: On Mon, Sep 28, 2009 at 16:40, Peng Yu pengyu...@gmail.com wrote: I attached the script that I run for build and the build output. I think that setup.py

Re: [Numpy-discussion] Convert data into rectangular grid

2009-09-28 Thread jah
On Mon, Sep 28, 2009 at 4:48 PM, josef.p...@gmail.com wrote: On Mon, Sep 28, 2009 at 7:19 PM, jah jah.mailingl...@gmail.com wrote: Hi, Suppose I have a set of x,y,c data (something useful for matplotlib.pyplot.plot() ). Generally, this data is not rectangular at all. Does there exist

Re: [Numpy-discussion] Convert data into rectangular grid

2009-09-28 Thread Robert Kern
On Mon, Sep 28, 2009 at 19:45, jah jah.mailingl...@gmail.com wrote: Here is the desired use case:  I have a set of x,y,c values that I could pass into matplotlib's scatter() or hexbin().   I'd like to take this same set of points and transform them so that I can pass them into matplotlib's