Re: [Numpy-discussion] Reduced row echelon form

2008-11-19 Thread Stéfan van der Walt
Hi Robert, 2008/11/18 Robert Young [EMAIL PROTECTED]: Is there a method in NumPy that reduces a matrix to it's reduced row echelon form? I'm brand new to both NumPy and linear algebra, and I'm not quite sure where to look. I use the Sympy package. It is small, easy to install, runs on pure

[Numpy-discussion] convert pair of real arrays - cmplx

2008-11-19 Thread Neal Becker
What's the best way to convert a pair of real arrays representing real and imag parts to a complex array? ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Getting indices from numpy array with condition

2008-11-19 Thread Scott Sinclair
2008/11/19 Robert Kern [EMAIL PROTECTED]: On Wed, Nov 19, 2008 at 01:31, David Warde-Farley [EMAIL PROTECTED] wrote: On 18-Nov-08, at 3:06 PM, Robert Kern wrote: I like to discourage this use of where(). For some reason, back in Numeric's days, where() got stuck with two functionalities.

[Numpy-discussion] question about the documentation of linalg.solve

2008-11-19 Thread Alan G Isaac
If if look at help(np.linalg.solve) I am told what it does but not how it does it. If I look at http://www.scipy.org/doc/numpy_api_docs/numpy.linalg.linalg.html#solve there is even less info. I'll guess the algorithm is Gaussian elimination, but how would I use the documentation to confirm this?

Re: [Numpy-discussion] question about the documentation of linalg.solve

2008-11-19 Thread Joshua Lippai
If you use iPython and use numpy.linalg.solve??, you can see the source code of the file numpy/linalg/linalg.py that corresponds to the solve(a,b) function, not just the docstring: def solve(a, b): Solve the equation ``a x = b`` for ``x``. Parameters -- a :

Re: [Numpy-discussion] question about the documentation of linalg.solve

2008-11-19 Thread Charles R Harris
On Wed, Nov 19, 2008 at 8:14 AM, Alan G Isaac [EMAIL PROTECTED] wrote: If if look at help(np.linalg.solve) I am told what it does but not how it does it. If I look at http://www.scipy.org/doc/numpy_api_docs/numpy.linalg.linalg.html#solve there is even less info. I'll guess the algorithm is

Re: [Numpy-discussion] question about the documentation of linalg.solve

2008-11-19 Thread Alan G Isaac
Thanks Charles and Josh, but my question about the documentation goal remains. Here is how this came up. I mentioned to a class that I have using NumPy that solving Ax=b with an inverse is computationally wasteful and also has accuracy problems, and I recommend using `solve` instead. So the

Re: [Numpy-discussion] convert pair of real arrays - cmplx

2008-11-19 Thread Robert Kern
On Wed, Nov 19, 2008 at 07:15, Neal Becker [EMAIL PROTECTED] wrote: What's the best way to convert a pair of real arrays representing real and imag parts to a complex array? What do you mean by best? Easiest to type? Easiest to read? Fastest? Memory efficient? Ideally, they'd all be the same,

Re: [Numpy-discussion] question about the documentation of linalg.solve

2008-11-19 Thread Fabrice Silva
Le mercredi 19 novembre 2008 à 14:27 -0500, Alan G Isaac a écrit : So my question is not just what is the algorithm but also, what is the documentation goal? Concerning the algorithm (only): in Joshua answer, you have might have seen that solve is a wrapper to lapack routines *gesv (z* or d*

[Numpy-discussion] matio lib

2008-11-19 Thread Neal Becker
A library for matlab io, perhaps this could be useful? http://sourceforge.net/projects/matio ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] question about the documentation of linalg.solve

2008-11-19 Thread Gael Varoquaux
On Wed, Nov 19, 2008 at 02:27:11PM -0500, Alan G Isaac wrote: So my question is not just what is the algorithm but also, what is the documentation goal? That's a good question. I feel the documentation should be as precise as possible, and thus answer this question. Currently it doesn't, but

[Numpy-discussion] simple python question on what happens when functions are declared

2008-11-19 Thread Frank Lagor
Hi, Can someone please explain what happens here: In testfile.py: x = 5 def arbFunc(): print x del x print Done with Test arbFunc() Then run the file with python testfile.py As opposed to x = 5 print x del x print Done with Test Which of course works fine. This question is of

Re: [Numpy-discussion] simple python question on what happens when functions are declared

2008-11-19 Thread Robert Kern
On Wed, Nov 19, 2008 at 17:30, Frank Lagor [EMAIL PROTECTED] wrote: Hi, Can someone please explain what happens here: In testfile.py: x = 5 def arbFunc(): print x You get an UnboundLocalError here. del x During the compilation process, Python sees this statement and assumes that

[Numpy-discussion] numpy.ma.mod missing

2008-11-19 Thread Charles سمير Doutriaux
Hello, Can I request that mod be added to numpy.ma ? Thx, C ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

[Numpy-discussion] simple python question on what happens when functions are declared

2008-11-19 Thread Frank Lagor
Thank you very much Robert. ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] question about the documentation of linalg.solve

2008-11-19 Thread Charles R Harris
On Wed, Nov 19, 2008 at 3:20 PM, Fabrice Silva [EMAIL PROTECTED]wrote: Le mercredi 19 novembre 2008 à 14:27 -0500, Alan G Isaac a écrit : So my question is not just what is the algorithm but also, what is the documentation goal? Concerning the algorithm (only): in Joshua answer, you have

[Numpy-discussion] unpickle

2008-11-19 Thread Frank Lagor
I have only used pickle a little and I did not see this in the docstring: Is there anyway to unpickle in reverse order? It appears the pickling works like a queue. I execute: pickle.dump(obj1,file) pickle.dump(obj2,file) Then when I go to retrieve: pickle.load(file) returns obj1

Re: [Numpy-discussion] unpickle

2008-11-19 Thread Robert Kern
On Wed, Nov 19, 2008 at 22:36, Frank Lagor [EMAIL PROTECTED] wrote: I have only used pickle a little and I did not see this in the docstring: Is there anyway to unpickle in reverse order? No. This, and your previous question, are mostly off-topic for numpy-discussion. You may want to ask such

Re: [Numpy-discussion] question about the documentation of linalg.solve

2008-11-19 Thread Scott Sinclair
2008/11/20 Charles R Harris [EMAIL PROTECTED]: On Wed, Nov 19, 2008 at 3:20 PM, Fabrice Silva [EMAIL PROTECTED] wrote: Le mercredi 19 novembre 2008 à 14:27 -0500, Alan G Isaac a écrit : So my question is not just what is the algorithm but also, what is the documentation goal? Concerning

Re: [Numpy-discussion] question about the documentation of linalg.solve

2008-11-19 Thread Charles R Harris
On Wed, Nov 19, 2008 at 10:58 PM, Scott Sinclair scott.sinclair.za@ gmail.com wrote: 2008/11/20 Charles R Harris [EMAIL PROTECTED]: On Wed, Nov 19, 2008 at 3:20 PM, Fabrice Silva [EMAIL PROTECTED] wrote: Le mercredi 19 novembre 2008 à 14:27 -0500, Alan G Isaac a écrit : So my

[Numpy-discussion] glibc memory corruption when running numpy.test()

2008-11-19 Thread Hoyt Koepke
Hello, Sorry about this bug report I know how much us programmers like these kind of bugs :-/. In testing the latest svn version of numpy (6083), I get a memory corruption error: test_csingle (test_linalg.TestSolve) ... ok test_double (test_linalg.TestSolve) ... ok test_empty

Re: [Numpy-discussion] glibc memory corruption when running numpy.test()

2008-11-19 Thread David Cournapeau
On Wed, 2008-11-19 at 23:23 -0800, Hoyt Koepke wrote: Hello, Sorry about this bug report I know how much us programmers like these kind of bugs :-/. In testing the latest svn version of numpy (6083), I get a memory corruption error: test_csingle (test_linalg.TestSolve) ... ok

Re: [Numpy-discussion] glibc memory corruption when running numpy.test()

2008-11-19 Thread Hoyt Koepke
Sorry; I also added '-fPIC' to the compile flags, though it may work without having it there. I just got errors related to not having it and so threw it at everything... --Hoyt On Wed, Nov 19, 2008 at 11:41 PM, Hoyt Koepke [EMAIL PROTECTED] wrote: Attached. I had a bunch of issues getting

Re: [Numpy-discussion] glibc memory corruption when running numpy.test()

2008-11-19 Thread David Cournapeau
On Wed, 2008-11-19 at 23:41 -0800, Hoyt Koepke wrote: Attached. I had a bunch of issues getting things to install with lapack and ATLAS. Which ones ? In the end I had to specify the following environment variables (+ appropriate command line options to ATLAS lapack) to get it to work.