[Numpy-discussion] [F2PY] Fortran call fails in IDLE / PyScripter

2008-12-03 Thread Christophe Chappet
What version of gfortran are you using (i.e. exactly which binary did you download)? GNU Fortran (GCC) 4.4.0 20080603 (experimental) [trunk revision 136333] Is this a write to standard output write (*,*) szText ? yes, it is. I forgot to say that it also works with pydev in Eclipse but I'm

[Numpy-discussion] trouble subclassing ndarray

2008-12-03 Thread Sébastien Barthélemy
Hello, I'm trying to write a small library of differential geometry, and I have some trouble subclassing ndarray. I'd like an HomogeneousMatrix class that subclasse ndarray and overloads some methods, such as inv(). Here is my first try, the inv() function and the inv_v1() method work as

Re: [Numpy-discussion] trouble subclassing ndarray

2008-12-03 Thread Fabrice Silva
Le mercredi 03 décembre 2008, Sébastien Barthélemy a écrit : Hello, Hi Sebastien! I'm trying to write a small library of differential geometry, and I have some trouble subclassing ndarray. I'd like an HomogeneousMatrix class that subclasse ndarray and overloads some methods, such as inv().

Re: [Numpy-discussion] trouble subclassing ndarray

2008-12-03 Thread Sébastien Barthélemy
2008/12/3 Kevin Jacobs [EMAIL PROTECTED] [EMAIL PROTECTED]: On Wed, Dec 3, 2008 at 9:19 AM, Sébastien Barthélemy [EMAIL PROTECTED] wrote: def inv_v1(self): self[0:4,0:4] = htr.inv(self) def inv_v2(self): data = htr.inv(self) self = HomogeneousMatrix(data) def

Re: [Numpy-discussion] trouble subclassing ndarray

2008-12-03 Thread Sébastien Barthélemy
2008/12/3 Fabrice Silva [EMAIL PROTECTED]: Le mercredi 03 décembre 2008, Sébastien Barthélemy a écrit : Hello, Hi Sebastien! Hello Fabrice There is something I missed: what is htr? I guess htr.inv is the inv function defined before the class. yes, I cut-n-pasted the function definition

Re: [Numpy-discussion] np.loadtxt : yet a new implementation...

2008-12-03 Thread Ryan May
Pierre GM wrote: I think that treating an explicitly-passed-in ' ' delimiter as identical to 'no delimiter' is a bad idea. If I say that ' ' is the delimiter, or '\t' is the delimiter, this should be treated *just* like ',' being the delimiter, where the expected output is: ['1', '2', '3', '4',

Re: [Numpy-discussion] np.loadtxt : yet a new implementation...

2008-12-03 Thread Alan G Isaac
If I know my data is already clean and is handled nicely by the old loadtxt, will I be able to turn off and the special handling in order to retain the old load speed? Alan Isaac ___ Numpy-discussion mailing list Numpy-discussion@scipy.org

Re: [Numpy-discussion] np.loadtxt : yet a new implementation...

2008-12-03 Thread Christopher Barker
Pierre GM wrote: I can try, but in that case, please write me a unittest, so that I have a clear and unambiguous idea of what you expect. fair enough, though I'm not sure when I'll have time to do it. I do wonder if anyone else thinks it would be useful to have multiple delimiters as an

Re: [Numpy-discussion] np.loadtxt : yet a new implementation...

2008-12-03 Thread Pierre GM
On Dec 3, 2008, at 12:48 PM, Christopher Barker wrote: Pierre GM wrote: I can try, but in that case, please write me a unittest, so that I have a clear and unambiguous idea of what you expect. fair enough, though I'm not sure when I'll have time to do it. Oh, don;t worry, nothing too

Re: [Numpy-discussion] np.loadtxt : yet a new implementation...

2008-12-03 Thread Pierre GM
On Dec 3, 2008, at 12:32 PM, Alan G Isaac wrote: If I know my data is already clean and is handled nicely by the old loadtxt, will I be able to turn off and the special handling in order to retain the old load speed? Hopefully. I'm looking for the best way to do it. Do you have an

Re: [Numpy-discussion] np.loadtxt : yet a new implementation...

2008-12-03 Thread Christopher Barker
by the way, should this work: io.loadtxt('junk.dat', delimiter=' ') for more than one space between numbers, like: 1 2 3 4 5 6 7 8 9 10 I get: io.loadtxt('junk.dat', delimiter=' ') Traceback (most recent call last): File stdin, line 1, in module File

Re: [Numpy-discussion] np.loadtxt : yet a new implementation...

2008-12-03 Thread Christopher Barker
Pierre GM wrote: Oh, don;t worry, nothing too fancy: give me a couple lines of input data and a line with what you expect. I just went and looked at the existing tests, and you're right, it's very easy -- my first foray into the new nose tests -- very nice! specify, say ',' as the

Re: [Numpy-discussion] np.loadtxt : yet a new implementation...

2008-12-03 Thread Christopher Barker
Alan G Isaac wrote: If I know my data is already clean and is handled nicely by the old loadtxt, will I be able to turn off and the special handling in order to retain the old load speed? what I'd like to see is a version of loadtxt built on a slightly enhanced fromfile() -- that would be

Re: [Numpy-discussion] np.loadtxt : yet a new implementation...

2008-12-03 Thread Pierre GM
On Dec 3, 2008, at 1:00 PM, Christopher Barker wrote: by the way, should this work: io.loadtxt('junk.dat', delimiter=' ') for more than one space between numbers, like: 1 2 3 4 5 6 7 8 9 10 On the version I'm working on, both delimiter='' and delimiter=None (default) would

Re: [Numpy-discussion] np.loadtxt : yet a new implementation...

2008-12-03 Thread Manuel Metz
Alan G Isaac wrote: If I know my data is already clean and is handled nicely by the old loadtxt, will I be able to turn off and the special handling in order to retain the old load speed? Alan Isaac Hi all, that's going in the same direction I was thinking about. When I thought about

Re: [Numpy-discussion] np.loadtxt : yet a new implementation...

2008-12-03 Thread Christopher Barker
Pierre GM wrote: On Dec 3, 2008, at 1:00 PM, Christopher Barker wrote: for more than one space between numbers, like: 1 2 3 4 5 6 7 8 9 10 On the version I'm working on, both delimiter='' and delimiter=None (default) would give you the expected output. so empty string and

Re: [Numpy-discussion] np.loadtxt : yet a new implementation...

2008-12-03 Thread Manuel Metz
Manuel Metz wrote: Alan G Isaac wrote: If I know my data is already clean and is handled nicely by the old loadtxt, will I be able to turn off and the special handling in order to retain the old load speed? Alan Isaac Hi all, that's going in the same direction I was thinking about.

Re: [Numpy-discussion] np.loadtxt : yet a new implementation...

2008-12-03 Thread Pierre GM
Manuel, Looks nice, I gonna try to see how I can incorporate yours. Note that returning np.nan by default will not work w/ Python 2.6 if you want an int... ___ Numpy-discussion mailing list Numpy-discussion@scipy.org

[Numpy-discussion] Apply a function to an array elementwise

2008-12-03 Thread Elfnor
Hi I want to apply a function (myfunc which takes and returns a scalar) to each element in a multi-dimensioned array (data): I can do this: newdata = numpy.array([myfunc(d) for d in data.flat]).reshape(data.shape) But I'm wondering if there's a faster more numpy way. I've looked at the

Re: [Numpy-discussion] Apply a function to an array elementwise

2008-12-03 Thread Travis Oliphant
Elfnor wrote: Hi I want to apply a function (myfunc which takes and returns a scalar) to each element in a multi-dimensioned array (data): I can do this: newdata = numpy.array([myfunc(d) for d in data.flat]).reshape(data.shape) But I'm wondering if there's a faster more numpy way. I've

Re: [Numpy-discussion] Compiler options for mingw?

2008-12-03 Thread David Cournapeau
On Sun, Nov 30, 2008 at 3:02 PM, David Cournapeau [EMAIL PROTECTED] wrote: No at the moment, but you can easily decompress the .exe content to get the internal .exe (which are straight installers built by python setup.py setup.py bdist_wininst). It should be possible to force an architecture