Re: [Numpy-discussion] Another suggestion for making numpy's functions generic

2009-10-19 Thread Anne Archibald
2009/10/19 Sebastian Walter : > > I'm all for generic (u)funcs since they might come handy for me since > I'm doing lots of operation on arrays of polynomials. Just as a side note, if you don't mind my asking, what sorts of operations do you do on arrays of polynomials? In a thread on scipy-dev we

Re: [Numpy-discussion] opening pickled numarray data with numpy

2009-10-19 Thread Jason Rennie
Try creating an empty module/class with the given name. I.e. create a 'numarray' dir off your PYTHONPATH, create an empty __init__.py file, create a 'generic.py' file in that dir and populate it with whatever class python complains about like so: #!/usr/bin/env python class MissingClass(object):

Re: [Numpy-discussion] object array alignment issues

2009-10-19 Thread Charles R Harris
On Mon, Oct 19, 2009 at 4:36 PM, Robert Kern wrote: > On Mon, Oct 19, 2009 at 17:28, Charles R Harris > wrote: > > > > On Mon, Oct 19, 2009 at 3:55 PM, Travis Oliphant > > > wrote: > > >> Right now, though, the patch has too many white-space only changes in > >> it. Could you submit a new patc

Re: [Numpy-discussion] object array alignment issues

2009-10-19 Thread Robert Kern
On Mon, Oct 19, 2009 at 17:28, Charles R Harris wrote: > > On Mon, Oct 19, 2009 at 3:55 PM, Travis Oliphant > wrote: >> Right now, though, the patch has too many white-space only changes in >> it.  Could you submit a new patch that removes those changes? > > The old whitespace is hard tabs and n

Re: [Numpy-discussion] Another suggestion for making numpy's functions generic

2009-10-19 Thread Travis Oliphant
On Oct 17, 2009, at 7:49 AM, Darren Dale wrote: > numpy's functions, especially ufuncs, have had some ability to support > subclasses through the ndarray.__array_wrap__ method, which provides > masked arrays or quantities (for example) with an opportunity to set > the class and metadata of the ou

Re: [Numpy-discussion] object array alignment issues

2009-10-19 Thread Charles R Harris
On Mon, Oct 19, 2009 at 3:55 PM, Travis Oliphant wrote: > > On Oct 19, 2009, at 9:55 AM, Michael Droettboom wrote: > > > I've filed a bug and attached a patch: > > > > http://projects.scipy.org/numpy/ticket/1267 > > > > No guarantees that I've found all of the alignment issues. I did a > > grep >

Re: [Numpy-discussion] object array alignment issues

2009-10-19 Thread Travis Oliphant
On Oct 19, 2009, at 9:55 AM, Michael Droettboom wrote: > I've filed a bug and attached a patch: > > http://projects.scipy.org/numpy/ticket/1267 > > No guarantees that I've found all of the alignment issues. I did a > grep > for "PyObject **" to find possible locations where PyObject * in > a

Re: [Numpy-discussion] user defined types

2009-10-19 Thread Robert Kern
On Mon, Oct 19, 2009 at 14:55, Artem Serebriyskiy wrote: > Hello! Would you please give me some examples of open source projects which > use the implementation of user defined types for numpy library? > (implementation on the C-API level) I'm not sure that anyone currently does. We do have an exa

[Numpy-discussion] user defined types

2009-10-19 Thread Artem Serebriyskiy
Hello! Would you please give me some examples of open source projects which use the implementation of user defined types for numpy library? (implementation on the C-API level) ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.

[Numpy-discussion] opening pickled numarray data with numpy

2009-10-19 Thread dagmar wismeijer
Hi, I've been trying to open (using numpy) old pickled data files that I once created using numarray, but I keep getting the message that there is no module numarray.generic. Is there any way I could open these datafiles without installing numarray again? Thanks in advance, Dagmar __

Re: [Numpy-discussion] Multiple string formatting while writing an array into a file

2009-10-19 Thread Gökhan Sever
On Sun, Oct 18, 2009 at 12:03 PM, Gökhan Sever wrote: > Hello, > > I have a relatively simple question which I couldn't figure out myself yet. > I have an array that I am writing into a file using the following savetxt > method. > > np.savetxt(fid, output_array, fmt='%12.4f', delimiter='') > > > H

Re: [Numpy-discussion] numpy build/installation problems ?

2009-10-19 Thread Pierre GM
On Oct 19, 2009, at 12:01 PM, George Nurser wrote: > I had the same 4 errors in genfromtext yesterday when I upgraded > numpy r 7539. > mac os x python 2.5.2. I'm on it, should be fixed in a few hours. Please, don't hesitate to open a ticket next time (so that I remember to test on 2.5 as w

Re: [Numpy-discussion] numpy build/installation problems ?

2009-10-19 Thread George Nurser
I had the same 4 errors in genfromtext yesterday when I upgraded numpy r 7539. mac os x python 2.5.2. --George. 2009/10/19 Pierre GM : > > On Oct 19, 2009, at 10:40 AM, josef.p...@gmail.com wrote: > >> I wanted to finally upgrade my numpy, so I can build scipy trunk >> again, but I get test fai

Re: [Numpy-discussion] numpy build/installation problems ?

2009-10-19 Thread Pierre GM
On Oct 19, 2009, at 10:40 AM, josef.p...@gmail.com wrote: > I wanted to finally upgrade my numpy, so I can build scipy trunk > again, but I get test failures with numpy. And running the tests of > the previously compiled version of scipy crashes in signaltools. The ConversionWarnings are expecte

Re: [Numpy-discussion] numpy build/installation problems ?

2009-10-19 Thread josef . pktd
On Mon, Oct 19, 2009 at 10:40 AM, wrote: > I wanted to finally upgrade my numpy, so I can build scipy trunk > again, but I get test failures with numpy. And running the tests of > the previously compiled version of scipy crashes in signaltools. > > Is this a problem with my build (the usual offic

Re: [Numpy-discussion] object array alignment issues

2009-10-19 Thread Michael Droettboom
I've filed a bug and attached a patch: http://projects.scipy.org/numpy/ticket/1267 No guarantees that I've found all of the alignment issues. I did a grep for "PyObject **" to find possible locations where PyObject * in arrays were being dereferenced. If I could write a unit test to make it f

[Numpy-discussion] numpy build/installation problems ?

2009-10-19 Thread josef . pktd
I wanted to finally upgrade my numpy, so I can build scipy trunk again, but I get test failures with numpy. And running the tests of the previously compiled version of scipy crashes in signaltools. Is this a problem with my build (the usual official MingW on WindowsXP), or are there still ABI prob

Re: [Numpy-discussion] Another suggestion for making numpy's functions generic

2009-10-19 Thread Darren Dale
On Mon, Oct 19, 2009 at 3:10 AM, Sebastian Walter wrote: > On Sat, Oct 17, 2009 at 2:49 PM, Darren Dale wrote: >> numpy's functions, especially ufuncs, have had some ability to support >> subclasses through the ndarray.__array_wrap__ method, which provides >> masked arrays or quantities (for exam

Re: [Numpy-discussion] fortran vs numpy on mac/linux - gcc performance?

2009-10-19 Thread Robin
Forgot to include the fortran code used: jm-g26b101:fortran robince$ cat test.f95 subroutine bincount (x,c,n,m) implicit none integer, intent(in) :: n,m integer, dimension(0:n-1), intent(in) :: x integer, dimension(0:m-1), intent(out) :: c integer :: i c = 0 do i = 0,

[Numpy-discussion] fortran vs numpy on mac/linux - gcc performance?

2009-10-19 Thread Robin
Hi, I have been looking at moving some of my bottleneck functions to fortran with f2py. To get started I tried some simple things, and was surprised they performend so much better than the number builtins - which I assumed would be c and would be quite fast. On my Macbook pro laptop (Intel core 2

Re: [Numpy-discussion] Another suggestion for making numpy's functions generic

2009-10-19 Thread Sebastian Walter
On Sat, Oct 17, 2009 at 2:49 PM, Darren Dale wrote: > numpy's functions, especially ufuncs, have had some ability to support > subclasses through the ndarray.__array_wrap__ method, which provides > masked arrays or quantities (for example) with an opportunity to set > the class and metadata of the