Re: [Numpy-discussion] 1.6: branching and release notes

2011-03-16 Thread Mark Wiebe
On Tue, Mar 15, 2011 at 8:29 PM, Ralf Gommers wrote: > > > On Wed, Mar 16, 2011 at 2:31 AM, Charles R Harris < > charlesr.har...@gmail.com> wrote: > >> >> >> On Tue, Mar 15, 2011 at 12:26 PM, Mark Wiebe wrote: >> >>> On Sun, Mar 13, 2011 at 11:59 PM, Ralf Gommers < >>> ralf.gomm...@googlemail.com

[Numpy-discussion] OpenOpt Suite release 0.33

2011-03-16 Thread Dmitrey
Hi all, I'm glad to inform you about new release 0.33 of our completely free (license: BSD) cross-platform software: OpenOpt: > * cplex has been connected > * New global solver interalg with guarantied precision, competitor to LGO, BARON, MATLAB's intsolver and Di

Re: [Numpy-discussion] 1.6: branching and release notes

2011-03-16 Thread Mark Wiebe
On Tue, Mar 15, 2011 at 10:42 PM, Ralf Gommers wrote: > > > On Wed, Mar 16, 2011 at 11:29 AM, Ralf Gommers < > ralf.gomm...@googlemail.com> wrote: > >> >> >> On Wed, Mar 16, 2011 at 2:31 AM, Charles R Harris < >> charlesr.har...@gmail.com> wrote: >> >>> >>> >>> On Tue, Mar 15, 2011 at 12:26 PM, Ma

Re: [Numpy-discussion] 1.6: branching and release notes

2011-03-16 Thread Ralf Gommers
On Wed, Mar 16, 2011 at 4:16 PM, Mark Wiebe wrote: > > > On Tue, Mar 15, 2011 at 10:42 PM, Ralf Gommers < > ralf.gomm...@googlemail.com> wrote: > >> >> >> On Wed, Mar 16, 2011 at 11:29 AM, Ralf Gommers < >> ralf.gomm...@googlemail.com> wrote: >> >>> >>> >>> On Wed, Mar 16, 2011 at 2:31 AM, Charle

[Numpy-discussion] convert dictionary of arrays into single array

2011-03-16 Thread John
Hello, I have a dictionary with structured arrays, keyed by integers 0...n. There are no other keys in the dictionary. What is the most efficient way to convert the dictionary of arrays to a single array? All the arrays have the same 'headings' and width, but different lengths. Is there somethi

Re: [Numpy-discussion] Multiple Linear Regression

2011-03-16 Thread Angus McMorland
On 16 March 2011 02:53, dileep kunjaai wrote: > Dear sir, >  Can we do multiple linear regression(MLR)  in python is there any > inbuilt function for MLR Yes, you can use np.linalg.lstsq [1] for this. Here's a quick example: import numpy as np # model is y = b0.x0 + b1.x1 + b2.x2 b = np.arra

Re: [Numpy-discussion] Fortran was dead ... [was Re: rewriting NumPy code in C or C++ or similar]

2011-03-16 Thread Sturla Molden
Den 16.03.2011 00:01, skrev Neal Becker: Here is how Fortran compares: > * 1-d, 2-d only or N-d?? Any of those. > * support for slice views? What exactly kind of support? Fortran 90 pointers create a view. real*8, target :: array(n,m) real*8, pointer :: view view => array(::2, ::2) Slicing

Re: [Numpy-discussion] Fortran was dead ... [was Re: rewriting NumPy code in C or C++ or similar]

2011-03-16 Thread Sturla Molden
Den 16.03.2011 13:25, skrev Sturla Molden: > > Fortran 90 pointers create a view. > > real*8, target :: array(n,m) > real*8, pointer :: view > > view => array(::2, ::2) Pardon, the second line should be real*8, pointer :: view(:,:) Sturla ___ NumPy-D

[Numpy-discussion] When was the ddof kwarg added to std()?

2011-03-16 Thread Darren Dale
Does anyone know when the ddof kwarg was added to std()? Has it always been there? Thanks, Darren ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Multiple Linear Regression

2011-03-16 Thread dileep kunjaai
Thank you for your time and consideration. On Wed, Mar 16, 2011 at 5:17 PM, Angus McMorland wrote: > On 16 March 2011 02:53, dileep kunjaai wrote: > > Dear sir, > > Can we do multiple linear regression(MLR) in python is there any > > inbuilt function for MLR > > Yes, you c

Re: [Numpy-discussion] When was the ddof kwarg added to std()?

2011-03-16 Thread Scott Sinclair
On 16 March 2011 14:52, Darren Dale wrote: > Does anyone know when the ddof kwarg was added to std()? Has it always > been there? Does 'git log --grep=ddof' help? Cheers, Scott ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.sc

[Numpy-discussion] *= operator not intuitive

2011-03-16 Thread Paul Anton Letnes
Hi! This little snippet of code tricked me (in a more convoluted form). The *= operator does not change the datatype of the left hand side array. Is this intentional? It did fool me and throw my results quite a bit off. I always assumed that 'a *= b' means exactly the same as 'a = a * b' but th

Re: [Numpy-discussion] *= operator not intuitive

2011-03-16 Thread Angus McMorland
On 16 March 2011 09:24, Paul Anton Letnes wrote: > Hi! > > This little snippet of code tricked me (in a more convoluted form). The *= > operator does not change the datatype of the left hand side array. Is this > intentional? It did fool me and throw my results quite a bit off. I always > assum

Re: [Numpy-discussion] *= operator not intuitive

2011-03-16 Thread Dag Sverre Seljebotn
On 03/16/2011 02:24 PM, Paul Anton Letnes wrote: > Hi! > > This little snippet of code tricked me (in a more convoluted form). The *= > operator does not change the datatype of the left hand side array. Is this > intentional? It did fool me and throw my results quite a bit off. I always > assume

Re: [Numpy-discussion] Multiple Linear Regression

2011-03-16 Thread Skipper Seabold
On Wed, Mar 16, 2011 at 2:53 AM, dileep kunjaai wrote: > Dear sir, >  Can we do multiple linear regression(MLR)  in python is there any > inbuilt function for MLR > You might be interested in statsmodels http://statsmodels.sourceforge.net/ Skipper ___

Re: [Numpy-discussion] *= operator not intuitive

2011-03-16 Thread Paul Anton Letnes
Heisann! On 16. mars 2011, at 14.30, Dag Sverre Seljebotn wrote: > On 03/16/2011 02:24 PM, Paul Anton Letnes wrote: >> Hi! >> >> This little snippet of code tricked me (in a more convoluted form). The *= >> operator does not change the datatype of the left hand side array. Is this >> intention

Re: [Numpy-discussion] *= operator not intuitive

2011-03-16 Thread Charles R Harris
On Wed, Mar 16, 2011 at 7:24 AM, Paul Anton Letnes < paul.anton.let...@gmail.com> wrote: > Hi! > > This little snippet of code tricked me (in a more convoluted form). The *= > operator does not change the datatype of the left hand side array. Is this > intentional? It did fool me and throw my resu

Re: [Numpy-discussion] When was the ddof kwarg added to std()?

2011-03-16 Thread Charles R Harris
On Wed, Mar 16, 2011 at 6:52 AM, Darren Dale wrote: > Does anyone know when the ddof kwarg was added to std()? Has it always > been there? > > IIRC, a few years back there was a long thread on the list about unbiased vs biased estimates of std and ddof may have been added then... or it may have b

Re: [Numpy-discussion] When was the ddof kwarg added to std()?

2011-03-16 Thread Darren Dale
On Wed, Mar 16, 2011 at 9:10 AM, Scott Sinclair wrote: > On 16 March 2011 14:52, Darren Dale wrote: >> Does anyone know when the ddof kwarg was added to std()? Has it always >> been there? > > Does 'git log --grep=ddof' help? Yes: March 7, 2008 Thanks ___

Re: [Numpy-discussion] Fortran was dead ... [was Re: rewriting NumPy code in C or C++ or similar]

2011-03-16 Thread Neal Becker
Sturla Molden wrote: > Den 16.03.2011 13:25, skrev Sturla Molden: >> >> Fortran 90 pointers create a view. >> >> real*8, target :: array(n,m) >> real*8, pointer :: view >> >> view => array(::2, ::2) > > Pardon, the second line should be > > real*8, pointer :: view(:,:) > > > Sturla Also: * c

Re: [Numpy-discussion] convert dictionary of arrays into single array

2011-03-16 Thread John Salvatier
Loop through to build a list of arrays, then use vstack on the list. On Wed, Mar 16, 2011 at 1:36 AM, John wrote: > Hello, > > I have a dictionary with structured arrays, keyed by integers 0...n. > There are no other keys in the dictionary. > > What is the most efficient way to convert the dicti

Re: [Numpy-discussion] Fortran was dead ... [was Re: rewriting NumPy code in C or C++ or similar]

2011-03-16 Thread Yung-Yu Chen
On Wed, Mar 16, 2011 at 09:46, Neal Becker wrote: > Sturla Molden wrote: > > > Den 16.03.2011 13:25, skrev Sturla Molden: > >> > >> Fortran 90 pointers create a view. > >> > >> real*8, target :: array(n,m) > >> real*8, pointer :: view > >> > >> view => array(::2, ::2) > > > > Pardon, the second

Re: [Numpy-discussion] convert dictionary of arrays into single array

2011-03-16 Thread Bruce Southey
On 03/16/2011 08:56 AM, John Salvatier wrote: Loop through to build a list of arrays, then use vstack on the list. On Wed, Mar 16, 2011 at 1:36 AM, John > wrote: Hello, I have a dictionary with structured arrays, keyed by integers 0...n. There are no oth

Re: [Numpy-discussion] convert dictionary of arrays into single array

2011-03-16 Thread John Salvatier
I think he wants to stack them (same widths) so stacking them should be fine. On Wed, Mar 16, 2011 at 7:30 AM, Bruce Southey wrote: > On 03/16/2011 08:56 AM, John Salvatier wrote: > > Loop through to build a list of arrays, then use vstack on the list. > > On Wed, Mar 16, 2011 at 1:36 AM, John

Re: [Numpy-discussion] hashing dtypes, new variation, old theme

2011-03-16 Thread Robert Kern
On Wed, Mar 16, 2011 at 01:18, Matthew Brett wrote: > Hi, > > Running the test suite for one of our libraries, there seems to have > been a recent breakage of the behavior of dtype hashing. > > This script: > > import numpy as np > > data0 = np.arange(10) > data1 = data0 - 10 > > dt0 = data0.dtype

Re: [Numpy-discussion] *= operator not intuitive

2011-03-16 Thread Chris Barker
On 3/16/11 6:34 AM, Charles R Harris wrote: > On Wed, Mar 16, 2011 at 7:24 AM, Paul Anton Letnes > Yes, it is intentional. Numpy is more C than Python in this case, I don't know that C has anything to do with it -- the *= operators were added specifically to be "in-place" operators -- otherwise

Re: [Numpy-discussion] hashing dtypes, new variation, old theme

2011-03-16 Thread Charles R Harris
On Wed, Mar 16, 2011 at 8:46 AM, Robert Kern wrote: > On Wed, Mar 16, 2011 at 01:18, Matthew Brett > wrote: > > Hi, > > > > Running the test suite for one of our libraries, there seems to have > > been a recent breakage of the behavior of dtype hashing. > > > > This script: > > > > import numpy

Re: [Numpy-discussion] *= operator not intuitive

2011-03-16 Thread Dag Sverre Seljebotn
On 03/16/2011 02:35 PM, Paul Anton Letnes wrote: > Heisann! Hei der, > On 16. mars 2011, at 14.30, Dag Sverre Seljebotn wrote: > >> On 03/16/2011 02:24 PM, Paul Anton Letnes wrote: >>> Hi! >>> >>> This little snippet of code tricked me (in a more convoluted form). The *= >>> operator does not ch

Re: [Numpy-discussion] *= operator not intuitive

2011-03-16 Thread Paul Anton Letnes
On 16. mars 2011, at 15.49, Chris Barker wrote: > On 3/16/11 6:34 AM, Charles R Harris wrote: >> On Wed, Mar 16, 2011 at 7:24 AM, Paul Anton Letnes > >> Yes, it is intentional. Numpy is more C than Python in this case, > > I don't know that C has anything to do with it -- the *= operators were

Re: [Numpy-discussion] *= operator not intuitive

2011-03-16 Thread Paul Anton Letnes
On 16. mars 2011, at 15.57, Dag Sverre Seljebotn wrote: > On 03/16/2011 02:35 PM, Paul Anton Letnes wrote: >> Heisann! > > Hei der, > >> On 16. mars 2011, at 14.30, Dag Sverre Seljebotn wrote: >> >>> On 03/16/2011 02:24 PM, Paul Anton Letnes wrote: Hi! This little snippet of co

Re: [Numpy-discussion] [OT] any image io module that works with python3?

2011-03-16 Thread René Dudfield
pygame On Sat, Mar 12, 2011 at 9:08 AM, Nadav Horesh wrote: > Having numpy, scipy, and matplotlib working reasonably with python3, a > major piece of code I miss for a major python3 migration is an image IO. I > found that pylab's imread works fine for png image, but I need to read all > the ot

Re: [Numpy-discussion] hashing dtypes, new variation, old theme

2011-03-16 Thread Charles R Harris
On Wed, Mar 16, 2011 at 8:56 AM, Charles R Harris wrote: > > > On Wed, Mar 16, 2011 at 8:46 AM, Robert Kern wrote: > >> On Wed, Mar 16, 2011 at 01:18, Matthew Brett >> wrote: >> > Hi, >> > >> > Running the test suite for one of our libraries, there seems to have >> > been a recent breakage of th

Re: [Numpy-discussion] *= operator not intuitive

2011-03-16 Thread Charles R Harris
On Wed, Mar 16, 2011 at 8:58 AM, Paul Anton Letnes < paul.anton.let...@gmail.com> wrote: > > On 16. mars 2011, at 15.49, Chris Barker wrote: > > > On 3/16/11 6:34 AM, Charles R Harris wrote: > >> On Wed, Mar 16, 2011 at 7:24 AM, Paul Anton Letnes > > > >> Yes, it is intentional. Numpy is more C th

Re: [Numpy-discussion] Is this a bug in repr ?

2011-03-16 Thread Mark Sienkiewicz
>> In that case, would you agree that it is a bug for >> assert_array_almost_equal to use repr() to display the arrays, since it >> is printing identical values and saying they are different? Or is there >> also a reason to do that? >> > > It should probably use np.array_repr(x, precision=16

Re: [Numpy-discussion] hashing dtypes, new variation, old theme

2011-03-16 Thread Robert Kern
On Wed, Mar 16, 2011 at 10:27, Charles R Harris wrote: > > On Wed, Mar 16, 2011 at 8:56 AM, Charles R Harris > wrote: >> >> >> On Wed, Mar 16, 2011 at 8:46 AM, Robert Kern >> wrote: >>> >>> On Wed, Mar 16, 2011 at 01:18, Matthew Brett >>> wrote: >>> > Hi, >>> > >>> > Running the test suite for

Re: [Numpy-discussion] *= operator not intuitive

2011-03-16 Thread Paul Anton Letnes
> > This comes up for discussion on a fairly regular basis. I tend towards the > more warnings side myself, but you aren't going to get the current behavior > changed unless you can convince a large bunch of people that it is the right > thing to do, which won't be easy. For one thing, a lot of

[Numpy-discussion] Numpy 1.5.1 test failures

2011-03-16 Thread Mark Dixon
Hi, Sorry if this is a noob question, but I've been trying to install Numpy for a while now and I keep having problems getting it to pass the test suite. I'm on a RHEL5 system, building against Python 2.6.5 (self-built with GCC 4.1.2), gfortran 4.1.2 and MKL 10.3 Update 2 (shipped with Intel

Re: [Numpy-discussion] hashing dtypes, new variation, old theme

2011-03-16 Thread Matthew Brett
Hi, On Wed, Mar 16, 2011 at 9:21 AM, Robert Kern wrote: > On Wed, Mar 16, 2011 at 10:27, Charles R Harris > wrote: >> >> On Wed, Mar 16, 2011 at 8:56 AM, Charles R Harris >> wrote: >>> >>> >>> On Wed, Mar 16, 2011 at 8:46 AM, Robert Kern >>> wrote: On Wed, Mar 16, 2011 at 01:18, Matt

Re: [Numpy-discussion] hashing dtypes, new variation, old theme

2011-03-16 Thread Robert Kern
On Wed, Mar 16, 2011 at 11:43, Matthew Brett wrote: > I can git-bisect it later in the day, will do so unless it's become > clear in the meantime. I'm almost done bisecting. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by ou

Re: [Numpy-discussion] hashing dtypes, new variation, old theme

2011-03-16 Thread Robert Kern
On Wed, Mar 16, 2011 at 11:55, Robert Kern wrote: > On Wed, Mar 16, 2011 at 11:43, Matthew Brett wrote: > >> I can git-bisect it later in the day, will do so unless it's become >> clear in the meantime. > > I'm almost done bisecting. 6c6dc487ca15818d1f4cc764debb15d73a61c03b is the first bad comm

Re: [Numpy-discussion] hashing dtypes, new variation, old theme

2011-03-16 Thread Mark Wiebe
On Wed, Mar 16, 2011 at 10:00 AM, Robert Kern wrote: > On Wed, Mar 16, 2011 at 11:55, Robert Kern wrote: > > On Wed, Mar 16, 2011 at 11:43, Matthew Brett > wrote: > > > >> I can git-bisect it later in the day, will do so unless it's become > >> clear in the meantime. > > > > I'm almost done bis

Re: [Numpy-discussion] hashing dtypes, new variation, old theme

2011-03-16 Thread Robert Kern
On Wed, Mar 16, 2011 at 12:15, Mark Wiebe wrote: > On Wed, Mar 16, 2011 at 10:00 AM, Robert Kern wrote: >> >> On Wed, Mar 16, 2011 at 11:55, Robert Kern wrote: >> > On Wed, Mar 16, 2011 at 11:43, Matthew Brett >> > wrote: >> > >> >> I can git-bisect it later in the day, will do so unless it's b

Re: [Numpy-discussion] Fortran was dead ... [was Re: rewriting NumPy code in C or C++ or similar]

2011-03-16 Thread Ravi
On Monday 14 March 2011 15:02:32 Sebastian Haase wrote: > Sturla has been writing so much about Fortran recently, and Ondrej now > says he has done the move from C/C++ to Fortran -- I thought Fortran > was dead ... !? ;-) > What am I missing here ? Comparing Fortran with C++ is like comparing Ma

Re: [Numpy-discussion] Fortran was dead ... [was Re: rewriting NumPy code in C or C++ or similar]

2011-03-16 Thread Dag Sverre Seljebotn
On 03/16/2011 08:10 PM, Ravi wrote: > On Monday 14 March 2011 15:02:32 Sebastian Haase wrote: >> Sturla has been writing so much about Fortran recently, and Ondrej now >> says he has done the move from C/C++ to Fortran -- I thought Fortran >> was dead ... !? ;-) >> What am I missing here ? > Comp

Re: [Numpy-discussion] Fortran was dead ... [was Re:rewriting NumPy code in C or C++ or similar]

2011-03-16 Thread baker . alexander
My two pence worth, my experience is across python, C++ and fortran (and a few other languages) and the posts here are interesting and relevant. I think that the true value of any of these languages is knowing any of them well, if you happen to work with other folks who share the same skills mo

[Numpy-discussion] Accessing elements of an object array

2011-03-16 Thread lists_ravi
Hi, How do I access elements of an object array? The object array was created by scipy.io.loadmat from a MAT file. Here's an example: In [10]: x Out[10]: array(array((7.399500875785845e-10, 7.721153414752673e-10, -0.984375), dtype=[('cl', '|O8'), ('tl', '|O8'), ('dagc', '|O8')]), dtype=obj

Re: [Numpy-discussion] Accessing elements of an object array

2011-03-16 Thread Robert Kern
On Wed, Mar 16, 2011 at 15:18, wrote: > Hi, >  How do I access elements of an object array? The object array was > created by scipy.io.loadmat from a MAT file. Here's an example: > > In [10]: x > Out[10]: > array(array((7.399500875785845e-10, 7.721153414752673e-10, -0.984375), >      dtype=[('cl'

Re: [Numpy-discussion] hashing dtypes, new variation, old theme

2011-03-16 Thread Mark Wiebe
On Wed, Mar 16, 2011 at 10:53 AM, Robert Kern wrote: > On Wed, Mar 16, 2011 at 12:15, Mark Wiebe wrote: > > On Wed, Mar 16, 2011 at 10:00 AM, Robert Kern > wrote: > >> > >> On Wed, Mar 16, 2011 at 11:55, Robert Kern > wrote: > >> > On Wed, Mar 16, 2011 at 11:43, Matthew Brett > > >> > wrote:

Re: [Numpy-discussion] loadmat output (was Re: Accessing elements of an object array)

2011-03-16 Thread lists_ravi
> On Wed, Mar 16, 2011 at 15:18, wrote: >> In [10]: x >> Out[10]: >> array(array((7.399500875785845e-10, 7.721153414752673e-10, -0.984375), >> Â Â Â dtype=[('cl', '|O8'), ('tl', '|O8'), ('dagc', '|O8')]), >> dtype=object) >> >> In [11]: x.shape, x.size >> Out[11]: ((), 1) > > It's not that it's

Re: [Numpy-discussion] Fortran was dead ... [was Re:rewriting NumPy code in C or C++ or similar]

2011-03-16 Thread william ratcliff
Related to this, what is the status of fwrap? Can it be used with fortran 95/2003 language features? There is a rather large code crystallographic codebase (fullprof) that is written in fortran 77 that the author has been porting to fortran 95/2003 and actually using modules for. I'd like to wri

Re: [Numpy-discussion] convert dictionary of arrays into single array

2011-03-16 Thread John
Yes, stacking is fine, and looping per John's suggestion is what I've done, I was just wondering if there was possibly a more 'pythonic' or more importantly efficient way than the loop. Thanks, john On Wed, Mar 16, 2011 at 3:38 PM, John Salvatier wrote: > I think he wants to stack them (same wid

Re: [Numpy-discussion] loadmat output (was Re: Accessing elements of an object array)

2011-03-16 Thread Matthew Brett
Hi, On Wed, Mar 16, 2011 at 1:56 PM, wrote: >> On Wed, Mar 16, 2011 at 15:18,   wrote: >>> In [10]: x >>> Out[10]: >>> array(array((7.399500875785845e-10, 7.721153414752673e-10, -0.984375), >>> Â  Â  Â dtype=[('cl', '|O8'), ('tl', '|O8'), ('dagc', '|O8')]), >>> dtype=object) >>> >>> In [11]: x.s

Re: [Numpy-discussion] *= operator not intuitive

2011-03-16 Thread Christopher Barker
On 3/16/11 9:22 AM, Paul Anton Letnes wrote: >> This comes up for discussion on a fairly regular basis. I tend towards the >> more warnings side myself, but you aren't going to get the current behavior >> changed unless you can convince a large bunch of people that it is the right >> thing to d

Re: [Numpy-discussion] Fortran was dead ... [was Re:rewriting NumPy code in C or C++ or similar]

2011-03-16 Thread Dag Sverre Seljebotn
On 03/16/2011 10:14 PM, william ratcliff wrote: > Related to this, what is the status of fwrap? Can it be used with > fortran 95/2003 language features? There is a rather large code > crystallographic codebase (fullprof) that is written in fortran 77 > that the author has been porting to fortr

[Numpy-discussion] Build ERROR ConfigParser.MissingSectionHeaderError: File contains no section headers

2011-03-16 Thread Jose Borreguero
Dear Numpy/SciPy users, I have a build error with Numpy: $ /usr/local/bin/python2.7 setup.py build File "/usr/local/lib/python2.7/ConfigParser.py", line 504, in _read raise MissingSectionHeaderError(fpname, lineno, line) ConfigParser.MissingSectionHeaderError: File contains no section

Re: [Numpy-discussion] Build ERROR ConfigParser.MissingSectionHeaderError: File contains no section headers

2011-03-16 Thread josef . pktd
On Thu, Mar 17, 2011 at 12:23 AM, Jose Borreguero wrote: > Dear Numpy/SciPy users, > > I have a build error with Numpy: > > $  /usr/local/bin/python2.7 setup.py build > >   File "/usr/local/lib/python2.7/ConfigParser.py", line 504, in _read >     raise MissingSectionHeaderError(fpname, lineno