Re: [Numpy-discussion] matrix inversion

2011-08-10 Thread Martin Teichmann
Hi, > i am trying to invert matrices like this: > [[ 0.01643777 -0.13539939  0.11946689] >  [ 0.12479926  0.01210898 -0.09217618] >  [-0.13050087  0.07575163  0.01144993]] > > in perl using Math::MatrixReal; > and in various online calculators i get > [  2.472715991745  3.680743681735 -3.831392002

Re: [Numpy-discussion] matrix inversion

2011-08-10 Thread Warren Focke
The svs are 1.1695e-01, 1.1682e-01, 6.84719250e-10 so if you try >>> np.linalg.pinv(a,1e-5) array([[ 0.41097834, 3.12024106, -3.26279309], [-3.38526587, 0.30274957, 1.89394811], [ 2.98692033, -2.30459609, 0.28627222]]) you at least get an answer that's not near-ran

Re: [Numpy-discussion] matrix inversion

2011-08-10 Thread Nadav Horesh
The matrix in singular, so you can not expect a stable inverse. Nadav. From: numpy-discussion-boun...@scipy.org [numpy-discussion-boun...@scipy.org] On Behalf Of jp d [yo...@yahoo.com] Sent: 11 August 2011 03:50 To: numpy-discussion@scipy.org Subject: [Numpy-d

Re: [Numpy-discussion] matrix inversion

2011-08-10 Thread Alan G Isaac
On 8/10/2011 8:50 PM, jp d wrote: > i am trying to invert matrices like this: > [[ 0.01643777 -0.13539939 0.11946689] > [ 0.12479926 0.01210898 -0.09217618] > [-0.13050087 0.07575163 0.01144993]] > in perl using Math::MatrixReal; > and in various online calculators i get > [ 2.47271599174

[Numpy-discussion] matrix inversion

2011-08-10 Thread jp d
hi, i am trying to invert matrices like this: [[ 0.01643777 -0.13539939  0.11946689]  [ 0.12479926  0.01210898 -0.09217618]  [-0.13050087  0.07575163  0.01144993]] in perl using Math::MatrixReal; and in various online calculators i get [  2.472715991745  3.680743681735 -3.831392002314 ] [ -4.67

Re: [Numpy-discussion] numpydoc - latex longtables error

2011-08-10 Thread Matthew Brett
Hi, On Wed, Aug 10, 2011 at 5:03 PM, wrote: > On Wed, Aug 10, 2011 at 6:17 PM, Matthew Brett > wrote: >> Hi, >> >> On Wed, Aug 10, 2011 at 12:38 PM, Skipper Seabold >> wrote: >>> On Wed, Aug 10, 2011 at 3:28 PM, Matthew Brett >>> wrote: Hi, I think this one might be for Paul

Re: [Numpy-discussion] numpydoc - latex longtables error

2011-08-10 Thread josef . pktd
On Wed, Aug 10, 2011 at 6:17 PM, Matthew Brett wrote: > Hi, > > On Wed, Aug 10, 2011 at 12:38 PM, Skipper Seabold wrote: >> On Wed, Aug 10, 2011 at 3:28 PM, Matthew Brett >> wrote: >>> Hi, >>> >>> I think this one might be for Pauli. >>> >>> I've run into an odd problem that seems to be an inte

Re: [Numpy-discussion] numpydoc - latex longtables error

2011-08-10 Thread Matthew Brett
Hi, On Wed, Aug 10, 2011 at 12:38 PM, Skipper Seabold wrote: > On Wed, Aug 10, 2011 at 3:28 PM, Matthew Brett > wrote: >> Hi, >> >> I think this one might be for Pauli. >> >> I've run into an odd problem that seems to be an interaction of >> numpydoc and autosummary and large classes. >> >> In

[Numpy-discussion] bug with assignment into an indexed array?

2011-08-10 Thread Benjamin Root
Came across this today when trying to determine what was wrong with my code: import numpy as np matched_to = np.array([-1] * 5) in_ellipse = np.array([False, True, True, True, False]) match = np.array([False, True, True]) matched_to[in_ellipse][match] = 3 I would expect matched_to to now be "arra

Re: [Numpy-discussion] Efficient way to load a 1Gb file?

2011-08-10 Thread Paul Anton Letnes
On 10. aug. 2011, at 21.03, Gael Varoquaux wrote: > On Wed, Aug 10, 2011 at 04:01:37PM -0400, Anne Archibald wrote: >> A 1 Gb text file is a miserable object anyway, so it might be desirable >> to convert to (say) HDF5 and then throw away the text file. > > +1 > > G +1 and a very warm recomme

Re: [Numpy-discussion] Efficient way to load a 1Gb file?

2011-08-10 Thread Derek Homeier
On 10 Aug 2011, at 22:03, Gael Varoquaux wrote: > On Wed, Aug 10, 2011 at 04:01:37PM -0400, Anne Archibald wrote: >> A 1 Gb text file is a miserable object anyway, so it might be desirable >> to convert to (say) HDF5 and then throw away the text file. > > +1 There might be concerns about ensurin

Re: [Numpy-discussion] Efficient way to load a 1Gb file?

2011-08-10 Thread Gael Varoquaux
On Wed, Aug 10, 2011 at 04:01:37PM -0400, Anne Archibald wrote: > A 1 Gb text file is a miserable object anyway, so it might be desirable > to convert to (say) HDF5 and then throw away the text file. +1 G ___ NumPy-Discussion mailing list NumPy-Discussi

Re: [Numpy-discussion] Efficient way to load a 1Gb file?

2011-08-10 Thread Anne Archibald
There was also some work on a semi-mutable array type that allowed appending along one axis, then 'freezing' to yield a normal numpy array (unfortunately I'm not sure how to find it in the mailing list archives). One could write such a setup by hand, using mmap() or realloc(), but I'd be inclined t

Re: [Numpy-discussion] Efficient way to load a 1Gb file?

2011-08-10 Thread Derek Homeier
On 10 Aug 2011, at 19:22, Russell E. Owen wrote: > A coworker is trying to load a 1Gb text data file into a numpy array > using numpy.loadtxt, but he says it is using up all of his machine's 6Gb > of RAM. Is there a more efficient way to read such text data files? The npyio routines (loadtxt as

Re: [Numpy-discussion] numpydoc - latex longtables error

2011-08-10 Thread Skipper Seabold
On Wed, Aug 10, 2011 at 3:28 PM, Matthew Brett wrote: > Hi, > > I think this one might be for Pauli. > > I've run into an odd problem that seems to be an interaction of > numpydoc and autosummary and large classes. > > In summary, large classes and numpydoc lead to large tables of class > methods,

[Numpy-discussion] numpydoc - latex longtables error

2011-08-10 Thread Matthew Brett
Hi, I think this one might be for Pauli. I've run into an odd problem that seems to be an interaction of numpydoc and autosummary and large classes. In summary, large classes and numpydoc lead to large tables of class methods, and there seems to be an error in the creation of the large tables in

[Numpy-discussion] Efficient way to load a 1Gb file?

2011-08-10 Thread Russell E. Owen
A coworker is trying to load a 1Gb text data file into a numpy array using numpy.loadtxt, but he says it is using up all of his machine's 6Gb of RAM. Is there a more efficient way to read such text data files? -- Russell ___ NumPy-Discussion mailing l

Re: [Numpy-discussion] problems with multiple outputs with numpy.nditer

2011-08-10 Thread George Nurser
Works fine with the [...]s. Thanks very much. --George On 10 August 2011 17:15, Mark Wiebe wrote: > On Wed, Aug 10, 2011 at 3:45 AM, George Nurser wrote: >> >> Hi, >> I'm running numpy 1.6.1rc2 + python 2.7.1 64-bit from python.org on OSX >> 10.6.8. >> >> I have a f2py'd fortran routine that in

[Numpy-discussion] numpy/ctypes segfault [was: PEP 3118 array size check]

2011-08-10 Thread Angus McMorland
On 10 August 2011 04:01, Pauli Virtanen wrote: > Mon, 08 Aug 2011 11:27:14 -0400, Angus McMorland wrote: >> I've just upgraded to the latest numpy from git along with upgrading >> Ubuntu to natty. Now some of my code, which relies on ctypes-wrapping of >> data structures from a messaging system, f

Re: [Numpy-discussion] problems with multiple outputs with numpy.nditer

2011-08-10 Thread Mark Wiebe
On Wed, Aug 10, 2011 at 3:45 AM, George Nurser wrote: > Hi, > I'm running numpy 1.6.1rc2 + python 2.7.1 64-bit from python.org on OSX > 10.6.8. > > I have a f2py'd fortran routine that inputs and outputs fortran real*8 > scalars, and I normally call it like > > tu,tv,E,El,IF,HF,HFI = LW.rotate2u(

[Numpy-discussion] problems with multiple outputs with numpy.nditer

2011-08-10 Thread George Nurser
Hi, I'm running numpy 1.6.1rc2 + python 2.7.1 64-bit from python.org on OSX 10.6.8. I have a f2py'd fortran routine that inputs and outputs fortran real*8 scalars, and I normally call it like tu,tv,E,El,IF,HF,HFI = LW.rotate2u(u,v,NN,ff,0) I now want to call it over 2D arrays UT,VT,N,f Using st

Re: [Numpy-discussion] PEP 3118 array size check

2011-08-10 Thread Pauli Virtanen
Mon, 08 Aug 2011 11:27:14 -0400, Angus McMorland wrote: > I've just upgraded to the latest numpy from git along with upgrading > Ubuntu to natty. Now some of my code, which relies on ctypes-wrapping of > data structures from a messaging system, fails with the error message: > > "RuntimeWarning: It