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

2011-03-15 Thread Sebastien Binet
On Mon, 14 Mar 2011 23:10:13 +0100, Matthieu Brucher matthieu.bruc...@gmail.com wrote: Hi, Intel Fortran is an excellent Fortran compiler. Why is Fortran still better than C and C++? - some rules are different, like arrays passed to functions are ALWAYS supposed to be independent in

Re: [Numpy-discussion] finding atlas

2011-03-15 Thread Mag Gam
Ralf, Actually, ATLAS isn't needed when using MKL. http://software.intel.com/en-us/forums/showthread.php?t=81451p=1#144534 I am going to try this link line out $(MKLROOT)/lib/em64t/libmkl_solver_ilp64.a -Wl,--start-group $(MKLROOT)/lib/em64t/libmkl_intel_ilp64.a

[Numpy-discussion] your morning zen

2011-03-15 Thread Neal Becker
I think that I shall never see a rotate right divide by three ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

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

2011-03-15 Thread Sturla Molden
Den 14.03.2011 23:02, skrev Sebastian Haase: 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 No, it is just that Fortran receives less hype. If Fortran was

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

2011-03-15 Thread Sturla Molden
Den 14.03.2011 23:10, skrev Matthieu Brucher: Intel Fortran is an excellent Fortran compiler. Why is Fortran still better than C and C++? - some rules are different, like arrays passed to functions are ALWAYS supposed to be independent in Fortran, whereas in C, you have to add a restrict

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

2011-03-15 Thread Matthieu Brucher
C++ templates maks binaries almost impossible to debug. Never had an issue with this and all my number crunching code is done through metaprogramming (with vectorization, cache blocking...) So I have a lot of complex template structures, and debugging them is easy. Then, if someone doesn't

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

2011-03-15 Thread Sturla Molden
Den 14.03.2011 23:10, skrev Matthieu Brucher: - Fortran 95 has an excellent array support, which is not currently available in C/C++ (perhaps with ArBB?) In C++ you can actually make array libraries that behave almost like a Fortran compiler (cf. Blitz++, Intel Array Building Blocks), but

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

2011-03-15 Thread Charles R Harris
On Tue, Mar 15, 2011 at 9:12 AM, Sturla Molden stu...@molden.no wrote: Den 14.03.2011 23:10, skrev Matthieu Brucher: - Fortran 95 has an excellent array support, which is not currently available in C/C++ (perhaps with ArBB?) In C++ you can actually make array libraries that behave almost

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

2011-03-15 Thread Christopher Barker
On 3/15/11 8:33 AM, Charles R Harris wrote: There really isn't a satisfactory array library for C++. The fact that every couple of years there is another project to produce one testifies to that fact. And I think not just the fact that there is not one, but that perhaps C++ the language, or

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

2011-03-15 Thread Mark Sienkiewicz
The usual expectation is that (when possible) repr() returns a value that you can eval() to get the original data back. But, from numpy import * a = array( [ 16.5069863163822 ] ) b = eval(repr(a)) a-b array([ -3.6111e-09]) import numpy.testing

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

2011-03-15 Thread Sturla Molden
Den 15.03.2011 16:33, skrev Charles R Harris: There really isn't a satisfactory array library for C++. The fact that every couple of years there is another project to produce one testifies to that fact. In order to be competitive against Fortran 95, an array library for C++ must do all the

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

2011-03-15 Thread Sturla Molden
Den 15.03.2011 17:10, skrev Christopher Barker: I've been slowly arriving to the conclusion that that is no place for C++ in programming. If you really need to twiddle bits, use C. If you need high performance numerics, use Fortran. If you need high level complex data structures, use Python

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

2011-03-15 Thread Sturla Molden
Den 15.03.2011 16:05, skrev Matthieu Brucher: BTW, instead of Blitzz++, you have vigra and Eigen that are the new equivalent libraries, and you may want to keep an eye on Intel's ArBB. Intel's ArBB is interesting. But in order for this to work, there must be an idustry standard that other

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

2011-03-15 Thread Yung-Yu Chen
On Tue, Mar 15, 2011 at 12:10, Christopher Barker chris.bar...@noaa.govwrote: On 3/15/11 8:33 AM, Charles R Harris wrote: There really isn't a satisfactory array library for C++. The fact that every couple of years there is another project to produce one testifies to that fact. And I

Re: [Numpy-discussion] Segfault with python 3.2 structured array non-existent field

2011-03-15 Thread Matthew Brett
Hi, On Sun, Mar 13, 2011 at 12:07 PM, Matthew Brett matthew.br...@gmail.com wrote: Hi, On Sun, Mar 13, 2011 at 11:51 AM, Christoph Gohlke cgoh...@uci.edu wrote: On 3/13/2011 11:29 AM, Matthew Brett wrote: Hi On Sun, Mar 13, 2011 at 9:54 AM, Christoph Gohlkecgoh...@uci.edu  wrote: On

Re: [Numpy-discussion] Segfault with python 3.2 structured array non-existent field

2011-03-15 Thread Pauli Virtanen
Tue, 15 Mar 2011 10:06:09 -0700, Matthew Brett wrote: Sorry to ask, and I ask partly because I'm in the middle of a py3k port, but is this the right fix to this problem? I was confused by the presence of the old PyString_AsString function. It's not a correct fix. The original code seems also

Re: [Numpy-discussion] Segfault with python 3.2 structured array non-existent field

2011-03-15 Thread Matthew Brett
Hi, On Tue, Mar 15, 2011 at 10:12 AM, Pauli Virtanen p...@iki.fi wrote: Tue, 15 Mar 2011 10:06:09 -0700, Matthew Brett wrote: Sorry to ask, and I ask partly because I'm in the middle of a py3k port, but is this the right fix to this problem?  I was confused by the presence of the old

Re: [Numpy-discussion] Segfault with python 3.2 structured array non-existent field

2011-03-15 Thread Charles R Harris
On Tue, Mar 15, 2011 at 11:12 AM, Pauli Virtanen p...@iki.fi wrote: Tue, 15 Mar 2011 10:06:09 -0700, Matthew Brett wrote: Sorry to ask, and I ask partly because I'm in the middle of a py3k port, but is this the right fix to this problem? I was confused by the presence of the old

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

2011-03-15 Thread Charles R Harris
On Tue, Mar 15, 2011 at 10:20 AM, Mark Sienkiewicz sienk...@stsci.eduwrote: The usual expectation is that (when possible) repr() returns a value that you can eval() to get the original data back. But, from numpy import * a = array( [ 16.5069863163822 ] ) b = eval(repr(a)) a-b

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

2011-03-15 Thread Sturla Molden
Den 15.03.2011 18:01, skrev Yung-Yu Chen: I really love the capabilities Fortran provides for quick array operations, especially floating-points. What I think Fortran is still lacking is better support of C pointers and structures. Fortran 90 has user defined types, but they are not ABI

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

2011-03-15 Thread Robert Kern
On Tue, Mar 15, 2011 at 12:39, Charles R Harris charlesr.har...@gmail.com wrote: Yes, I think it is a bug. IIRC, it also shows up for object arrays. It's extremely long-standing, documented, intentional behavior dating back to Numeric. [~] |1 import Numeric [~] |2 a = Numeric.array( [

Re: [Numpy-discussion] Segfault with python 3.2 structured array non-existent field

2011-03-15 Thread Pauli Virtanen
Tue, 15 Mar 2011 10:23:35 -0700, Matthew Brett wrote: [clip] OK - I realize I'm being very lazy here but, do you mean: PyErr_Format(PyExc_ValueError, field named %s not found., PyString_AsString(PyObject_Repr(index))); The

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

2011-03-15 Thread Mark Sienkiewicz
Robert Kern wrote: On Tue, Mar 15, 2011 at 12:39, Charles R Harris charlesr.har...@gmail.com wrote: Yes, I think it is a bug. IIRC, it also shows up for object arrays. It's extremely long-standing, documented, intentional behavior dating back to Numeric. [~] |1 import Numeric

Re: [Numpy-discussion] Segfault with python 3.2 structured array non-existent field

2011-03-15 Thread Matthew Brett
Hi, On Tue, Mar 15, 2011 at 11:07 AM, Pauli Virtanen p...@iki.fi wrote: Tue, 15 Mar 2011 10:23:35 -0700, Matthew Brett wrote: [clip] OK - I realize I'm being very lazy here but, do you mean:         PyErr_Format(PyExc_ValueError,                      field named %s not found.,              

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

2011-03-15 Thread Mark Wiebe
On Sun, Mar 13, 2011 at 11:59 PM, Ralf Gommers ralf.gomm...@googlemail.comwrote: On Mon, Mar 14, 2011 at 2:22 PM, Mark Wiebe mwwi...@gmail.com wrote: On Sun, Mar 13, 2011 at 7:47 PM, Charles R Harris charlesr.har...@gmail.com wrote: On Sun, Mar 13, 2011 at 8:23 PM, Mark Wiebe

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

2011-03-15 Thread Robert Kern
On Tue, Mar 15, 2011 at 13:10, Mark Sienkiewicz sienk...@stsci.edu wrote: Robert Kern wrote: On Tue, Mar 15, 2011 at 12:39, Charles R Harris charlesr.har...@gmail.com wrote: Yes, I think it is a bug. IIRC, it also shows up for object arrays. It's extremely long-standing, documented,

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

2011-03-15 Thread Nadav Horesh
Just downloaded and got the same problems. I'll try to debug and provide a decent analysis, but it would take some days as I am busy with other things. Thank you, Nadav. From: numpy-discussion-boun...@scipy.org

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

2011-03-15 Thread Charles R Harris
On Tue, Mar 15, 2011 at 12:26 PM, Mark Wiebe mwwi...@gmail.com wrote: On Sun, Mar 13, 2011 at 11:59 PM, Ralf Gommers ralf.gomm...@googlemail.com wrote: On Mon, Mar 14, 2011 at 2:22 PM, Mark Wiebe mwwi...@gmail.com wrote: On Sun, Mar 13, 2011 at 7:47 PM, Charles R Harris

Re: [Numpy-discussion] Segfault with python 3.2 structured array non-existent field

2011-03-15 Thread Christoph Gohlke
On 3/15/2011 10:12 AM, Pauli Virtanen wrote: Tue, 15 Mar 2011 10:06:09 -0700, Matthew Brett wrote: Sorry to ask, and I ask partly because I'm in the middle of a py3k port, but is this the right fix to this problem? I was confused by the presence of the old PyString_AsString function. It's

Re: [Numpy-discussion] Segfault with python 3.2 structured array non-existent field

2011-03-15 Thread Christoph Gohlke
On 3/15/2011 11:34 AM, Christoph Gohlke wrote: On 3/15/2011 10:12 AM, Pauli Virtanen wrote: Tue, 15 Mar 2011 10:06:09 -0700, Matthew Brett wrote: Sorry to ask, and I ask partly because I'm in the middle of a py3k port, but is this the right fix to this problem? I was confused by the

Re: [Numpy-discussion] [Numpy-svn] aada93: ENH: Add 'subok' parameter to PyArray_NewLikeArray...

2011-03-15 Thread Sebastian Haase
On Tue, Mar 15, 2011 at 7:22 PM, nore...@github.com wrote: Branch: refs/heads/master Home:   https://github.com/numpy/numpy Commit: aada93306acfb4e2eb816faf32652edf8825cf45     https://github.com/numpy/numpy/commit/aada93306acfb4e2eb816faf32652edf8825cf45 Author: Mark Wiebe

Re: [Numpy-discussion] [Numpy-svn] aada93: ENH: Add 'subok' parameter to PyArray_NewLikeArray...

2011-03-15 Thread Wes McKinney
On Tue, Mar 15, 2011 at 3:25 PM, Sebastian Haase seb.ha...@gmail.com wrote: On Tue, Mar 15, 2011 at 7:22 PM,  nore...@github.com wrote: Branch: refs/heads/master Home:   https://github.com/numpy/numpy Commit: aada93306acfb4e2eb816faf32652edf8825cf45    

Re: [Numpy-discussion] [Numpy-svn] aada93: ENH: Add 'subok' parameter to PyArray_NewLikeArray...

2011-03-15 Thread Mark Wiebe
On Tue, Mar 15, 2011 at 12:25 PM, Sebastian Haase seb.ha...@gmail.comwrote: snip Log Message: --- ENH: Add 'subok' parameter to PyArray_NewLikeArray, np.empty_like, np.zeros_like, and np.ones_like This way, the sub-type can be avoided if necessary. This helps mitigate, but

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

2011-03-15 Thread Stéfan van der Walt
On Tue, Mar 15, 2011 at 8:31 PM, Nadav Horesh nad...@visionsense.com wrote: Just downloaded and got the same problems. I'll try to debug and provide a decent analysis, but it would take some days as I am busy with other things. Thanks, that'd be appreciated; I am able to load images using

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

2011-03-15 Thread Neal Becker
Charles R Harris wrote: On Tue, Mar 15, 2011 at 9:12 AM, Sturla Molden stu...@molden.no wrote: Den 14.03.2011 23:10, skrev Matthieu Brucher: - Fortran 95 has an excellent array support, which is not currently available in C/C++ (perhaps with ArBB?) In C++ you can actually make array

Re: [Numpy-discussion] Segfault with python 3.2 structured array non-existent field

2011-03-15 Thread Matthew Brett
Hi, On Tue, Mar 15, 2011 at 10:23 AM, Matthew Brett matthew.br...@gmail.com wrote: Hi, On Tue, Mar 15, 2011 at 10:12 AM, Pauli Virtanen p...@iki.fi wrote: Tue, 15 Mar 2011 10:06:09 -0700, Matthew Brett wrote: Sorry to ask, and I ask partly because I'm in the middle of a py3k port, but is

[Numpy-discussion] structured array indexing oddity

2011-03-15 Thread Matthew Brett
Hi, I just wrote a short test for indexing into structured arrays with strings and found this: In [4]: a = np.zeros((1,), dtype=[('f1', 'i4')]) In [5]: a['f1'] Out[5]: array([0]) In [6]: a['f2'] # not present - error ---

Re: [Numpy-discussion] Segfault with python 3.2 structured array non-existent field

2011-03-15 Thread Christoph Gohlke
On 3/15/2011 5:13 PM, Matthew Brett wrote: Hi, On Tue, Mar 15, 2011 at 10:23 AM, Matthew Brettmatthew.br...@gmail.com wrote: Hi, On Tue, Mar 15, 2011 at 10:12 AM, Pauli Virtanenp...@iki.fi wrote: Tue, 15 Mar 2011 10:06:09 -0700, Matthew Brett wrote: Sorry to ask, and I ask partly

Re: [Numpy-discussion] Segfault with python 3.2 structured array non-existent field

2011-03-15 Thread Matthew Brett
Hi, On Tue, Mar 15, 2011 at 5:30 PM, Christoph Gohlke cgoh...@uci.edu wrote: On 3/15/2011 5:13 PM, Matthew Brett wrote: Hi, On Tue, Mar 15, 2011 at 10:23 AM, Matthew Brettmatthew.br...@gmail.com   wrote: Hi, On Tue, Mar 15, 2011 at 10:12 AM, Pauli Virtanenp...@iki.fi  wrote: Tue, 15

Re: [Numpy-discussion] structured array indexing oddity

2011-03-15 Thread Anthony Scopatz
Hi Matt, Actually, based on what is happening under the covers I think this behavior makes sense. a['f2'] would in theory grab the whole column, and so 'f2' not existing is a field error. a[0] on the other hand grabs the first row from the full structured array and treats this as (key, value)

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

2011-03-15 Thread Ralf Gommers
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 mwwi...@gmail.com wrote: On Sun, Mar 13, 2011 at 11:59 PM, Ralf Gommers ralf.gomm...@googlemail.com wrote: Hi Mark, I see you just did this, but is there

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

2011-03-15 Thread Charles R Harris
On Tue, Mar 15, 2011 at 9:29 PM, Ralf Gommers ralf.gomm...@googlemail.comwrote: 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 mwwi...@gmail.com wrote: On Sun, Mar 13, 2011 at 11:59 PM, Ralf Gommers

Re: [Numpy-discussion] Segfault with python 3.2 structured array non-existent field

2011-03-15 Thread Matthew Brett
Hi, On Tue, Mar 15, 2011 at 5:55 PM, Matthew Brett matthew.br...@gmail.com wrote: Hi, On Tue, Mar 15, 2011 at 5:30 PM, Christoph Gohlke cgoh...@uci.edu wrote: On 3/15/2011 5:13 PM, Matthew Brett wrote: Hi, On Tue, Mar 15, 2011 at 10:23 AM, Matthew Brettmatthew.br...@gmail.com   wrote:

[Numpy-discussion] a newbie parallelization question

2011-03-15 Thread Kibeom Kim
Example code: from pylab import * cos(random([1000,1000])) Q1. Is there any reason that numpy doesn't automatically support parallelization of element-wise operations like the example, even with Atlas or MKL? Q2. What is the most advisable way to parallelize(multi-thread) the example? numexpr?

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

2011-03-15 Thread Ralf Gommers
On Wed, Mar 16, 2011 at 11:29 AM, Ralf Gommers ralf.gomm...@googlemail.comwrote: 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 mwwi...@gmail.com wrote: I pushed one more small API change to

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

2011-03-15 Thread Ralf Gommers
On Wed, Mar 16, 2011 at 12:02 PM, Charles R Harris charlesr.har...@gmail.com wrote: On Tue, Mar 15, 2011 at 9:29 PM, 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,