Re: [Numpy-discussion] Atlas build issues

2010-10-20 Thread David
On 10/20/2010 04:23 PM, Gael Varoquaux wrote: I am really sorry to be landing on the mailing list with Atlas build issues. I usually manage be myself to build Atlas, but this time I have been fighting for a couple of days with little success. The reason I need to build Atlas is that our work

Re: [Numpy-discussion] Atlas build issues

2010-10-20 Thread David
On 10/20/2010 04:39 PM, David wrote: On 10/20/2010 04:23 PM, Gael Varoquaux wrote: I am really sorry to be landing on the mailing list with Atlas build issues. I usually manage be myself to build Atlas, but this time I have been fighting for a couple of days with little success. The reason I

Re: [Numpy-discussion] Atlas build issues

2010-10-20 Thread Gael Varoquaux
On Wed, Oct 20, 2010 at 09:38:25AM +0200, Gael Varoquaux wrote: Hum, this page is mentionning a '--with-netlib-lapack' swith the the configre that is not in the INSTALL.txt of my atlas version. OK, that's no longer valid. However, I just realize that atlas now packages the netlib lapack in

[Numpy-discussion] dtype comparison and hashing - bug?

2010-10-20 Thread Matthew Brett
Hi, I have just run into this oddness: In [28]: dt1 = np.dtype('f4') In [29]: dt1.str Out[29]: 'f4' In [30]: dt2 = dt1.newbyteorder('') In [31]: dt2.str Out[31]: 'f4' In [32]: dt1 == dt2 Out[32]: True In [33]: hash(dt1) == hash(dt2) Out[33]: False This is the same as:

Re: [Numpy-discussion] dtype comparison and hashing - bug?

2010-10-20 Thread David Cournapeau
On Wed, Oct 20, 2010 at 5:08 PM, Matthew Brett matthew.br...@gmail.com wrote: Hi, I have just run into this oddness: In [28]: dt1 = np.dtype('f4') In [29]: dt1.str Out[29]: 'f4' In [30]: dt2 = dt1.newbyteorder('') In [31]: dt2.str Out[31]: 'f4' In [32]: dt1 == dt2 Out[32]: True

Re: [Numpy-discussion] Atlas build issues

2010-10-20 Thread Gael Varoquaux
On Wed, Oct 20, 2010 at 09:43:12AM +0200, Gael Varoquaux wrote: On Wed, Oct 20, 2010 at 09:38:25AM +0200, Gael Varoquaux wrote: Hum, this page is mentionning a '--with-netlib-lapack' swith the the configre that is not in the INSTALL.txt of my atlas version. OK, that's no longer valid.

Re: [Numpy-discussion] Atlas build issues

2010-10-20 Thread Gael Varoquaux
On Wed, Oct 20, 2010 at 04:41:38PM +0900, David wrote: - ldd /volatile/varoquau/dev/numpy/numpy/linalg/lapack_lite.so: does it load the libraries you think are you loading ? For the dynamic libraries, it seems so. I am using static libraries for atlas/blas (.a) - nm atlas_libraries

Re: [Numpy-discussion] dtype comparison and hashing - bug?

2010-10-20 Thread Matthew Brett
Hi, It already has a ticket :)    http://projects.scipy.org/numpy/ticket/1637 Oops - sorry - thanks for point that out. Cheers, Matthew ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org

Re: [Numpy-discussion] whitespace in git repo

2010-10-20 Thread Friedrich Romstedt
2010/10/20 Charles R Harris charlesr.har...@gmail.com: [...] I think we do need a .gitconfig file [...] .gitattributes so why don't you go ahead and make one and deal with the nsi.in file in the process. http://github.com/friedrichromstedt/numpy/tree/friedrich-gitattributes-nsis The .svg

Re: [Numpy-discussion] whitespace in git repo

2010-10-20 Thread Darren Dale
On Wed, Oct 20, 2010 at 6:12 AM, Friedrich Romstedt friedrichromst...@gmail.com wrote: Due to Darren's config file the .nsi.in file made it with CRLF into the repo. Uh, no. ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org

Re: [Numpy-discussion] Atlas build issues

2010-10-20 Thread Ian Goodfellow
--with-netlib-lapack is indeed no longer valid. INSTALL.txt includes a warning that INSTALL.txt is out of date, you should refer to doc/atlas_install.pdf instead. The new option is --with-netlib-lapack-tarfile I successfully built 3.9.25 with this option a while ago, but haven't been able to get

Re: [Numpy-discussion] Atlas build issues

2010-10-20 Thread Gael Varoquaux
On Wed, Oct 20, 2010 at 09:13:24AM -0400, Ian Goodfellow wrote: --with-netlib-lapack is indeed no longer valid. INSTALL.txt includes a warning that INSTALL.txt is out of date, you should refer to doc/atlas_install.pdf instead. Ah, I read too quickly and missed that. Thanks. The

[Numpy-discussion] function name as parameter

2010-10-20 Thread Thomas Kirk Gamble
I'm trying to write an implementation of the amoeba function from numerical recipes and need to be able to pass a function name and parameter list to be called from within the amoeba function. Simply passing the name as a string doesn't work since python doesn't know it is a function and throws a

Re: [Numpy-discussion] function name as parameter

2010-10-20 Thread Zachary Pincus
I'm trying to write an implementation of the amoeba function from numerical recipes and need to be able to pass a function name and parameter list to be called from within the amoeba function. Simply passing the name as a string doesn't work since python doesn't know it is a function and

Re: [Numpy-discussion] function name as parameter

2010-10-20 Thread Johann Cohen-Tanugi
If you really need to pass the function name : In [3]: def my_func(x): ...: return 2*x In [4]: def caller(fname,x): ...: return eval(%s(%f)%(fname,x)) In [5]: caller(my_func,2) Out[5]: 4.0 On 10/20/2010 03:46 PM, Zachary Pincus wrote: I'm trying to write an implementation of

Re: [Numpy-discussion] function name as parameter

2010-10-20 Thread josef . pktd
On Wed, Oct 20, 2010 at 9:46 AM, Zachary Pincus zachary.pin...@yale.edu wrote: I'm trying to write an implementation of the amoeba function from numerical recipes and need to be able to pass a function name and parameter list to be called from within the amoeba function.  Simply passing the

Re: [Numpy-discussion] Atlas build issues

2010-10-20 Thread Ian Goodfellow
There were two problems. First, numpy ignored my export ATLAS=/usr/local/atlas. setup.py printed out the directories it was searching and it just searched the defaults then said it couldn't find ATLAS. I 'fixed' that problem by adding symlinks in the default directories. Now I get error messages

Re: [Numpy-discussion] whitespace in git repo

2010-10-20 Thread Friedrich Romstedt
2010/10/20 Darren Dale dsdal...@gmail.com: On Wed, Oct 20, 2010 at 6:12 AM, Friedrich Romstedt friedrichromst...@gmail.com wrote: Due to Darren's config file the .nsi.in file made it with CRLF into the repo. Uh, no. You mean I'm wrong? Wait, I'll check, but ...Hmm, how do I check the line

Re: [Numpy-discussion] function name as parameter

2010-10-20 Thread Thomas Kirk Gamble
On Wed, 2010-10-20 at 09:46 -0400, Zachary Pincus wrote: I'm trying to write an implementation of the amoeba function from numerical recipes and need to be able to pass a function name and parameter list to be called from within the amoeba function. Simply passing the name as a string

Re: [Numpy-discussion] whitespace in git repo

2010-10-20 Thread Charles R Harris
On Wed, Oct 20, 2010 at 9:56 AM, Friedrich Romstedt friedrichromst...@gmail.com wrote: 2010/10/20 Darren Dale dsdal...@gmail.com: On Wed, Oct 20, 2010 at 6:12 AM, Friedrich Romstedt friedrichromst...@gmail.com wrote: Due to Darren's config file the .nsi.in file made it with CRLF into the

[Numpy-discussion] ANN: NUmexpr 1.4.1 released

2010-10-20 Thread Francesc Alted
== Announcing Numexpr 1.4.1 == Numexpr is a fast numerical expression evaluator for NumPy. With it, expressions that operate on arrays (like 3*a+4*b) are accelerated and use less memory than doing the same calculation in Python. What's new

[Numpy-discussion] numpy.test() segfaults '2.0.0.dev8716'

2010-10-20 Thread Nils Wagner
test_duplicate_field_names_assign (test_regression.TestRegression) ... FF Program received signal SIGSEGV, Segmentation fault. 0x77b3077a in ?? () from /usr/lib64/libpython2.6.so.1.0 (gdb) bt #0 0x77b3077a in ?? () from /usr/lib64/libpython2.6.so.1.0 #1

Re: [Numpy-discussion] datarray lightning talk at NYC Python group

2010-10-20 Thread M Trumpis
On Mon, Oct 18, 2010 at 5:18 PM, Fernando Perez fperez@gmail.com wrote: On Mon, Oct 18, 2010 at 11:21 AM, M Trumpis mtrum...@berkeley.edu wrote: Just a heads up that I'm going to do a quick pitch for datarray this Wed. at the NYC Python Meetup thing. If any collaborator is attending,

Re: [Numpy-discussion] whitespace in git repo

2010-10-20 Thread Darren Dale
On Wed, Oct 20, 2010 at 11:56 AM, Friedrich Romstedt friedrichromst...@gmail.com wrote: 2010/10/20 Darren Dale dsdal...@gmail.com: On Wed, Oct 20, 2010 at 6:12 AM, Friedrich Romstedt friedrichromst...@gmail.com wrote: Due to Darren's config file the .nsi.in file made it with CRLF into the

Re: [Numpy-discussion] whitespace in git repo

2010-10-20 Thread Friedrich Romstedt
.nsi.in has '$\n\r' Is this now LFCR or CRLF? doall.py and py3tool.py have '$\n' precisely. I'm on Mac. \n is the at least vim-default on Mac. So yes, confirming that it's already in the repo. What about the svg eols? Do we need my branch now, or do we want to leave it alone? When others

Re: [Numpy-discussion] function name as parameter

2010-10-20 Thread Thomas Kirk Gamble
On Wed, 2010-10-20 at 13:18 -0400, Alan G Isaac wrote: On 10/20/2010 9:42 AM, Thomas Kirk Gamble wrote: I'm trying to write an implementation of the amoeba function from numerical recipes and need to be able to pass a function name and parameter list to be called from within the amoeba

Re: [Numpy-discussion] function name as parameter

2010-10-20 Thread Nathaniel Smith
On Wed, Oct 20, 2010 at 6:51 AM, Johann Cohen-Tanugi co...@lpta.in2p3.fr wrote: If you really need to pass the function name : In [3]: def my_func(x):    ...:     return 2*x In [4]: def caller(fname,x):    ...:     return eval(%s(%f)%(fname,x)) In [5]: caller(my_func,2) Out[5]: 4.0 The

Re: [Numpy-discussion] function name as parameter

2010-10-20 Thread Johann Cohen-Tanugi
On 10/20/2010 10:35 PM, Nathaniel Smith wrote: On Wed, Oct 20, 2010 at 6:51 AM, Johann Cohen-Tanugi co...@lpta.in2p3.fr wrote: If you really need to pass the function name : In [3]: def my_func(x): ...: return 2*x In [4]: def caller(fname,x): ...: return

Re: [Numpy-discussion] numpy.test() segfaults '2.0.0.dev8716'

2010-10-20 Thread Pauli Virtanen
Wed, 20 Oct 2010 19:21:15 +0200, Nils Wagner wrote: test_duplicate_field_names_assign (test_regression.TestRegression) ... Works for me. This is exactly the crash that the test tests, so perhaps you have an incomplete rebuild. I'd try rm -rf build and rebuild. -- Pauli Virtanen

Re: [Numpy-discussion] function name as parameter

2010-10-20 Thread Robert Kern
On Wed, Oct 20, 2010 at 15:58, Johann Cohen-Tanugi co...@lpta.in2p3.fr wrote: On 10/20/2010 10:35 PM, Nathaniel Smith wrote: IMPORTANT USAGE NOTE: never do this :-) What would you recommand? I do encounter situations where I need instantiation based on the name of the thing to instantiate,

Re: [Numpy-discussion] function name as parameter

2010-10-20 Thread Johann Cohen-Tanugi
On 10/20/2010 11:10 PM, Robert Kern wrote: On Wed, Oct 20, 2010 at 15:58, Johann Cohen-Tanugico...@lpta.in2p3.fr wrote: On 10/20/2010 10:35 PM, Nathaniel Smith wrote: IMPORTANT USAGE NOTE: never do this :-) What would you recommand? I do encounter situations where

Re: [Numpy-discussion] function name as parameter

2010-10-20 Thread Zachary Pincus
Hi Robert, so in a big data analysis framework, that is essentially written in C ++, exposed to python with SWIG, plus dedicated python modules, the user performs an analysis choosing some given modules by name,as in : myOpt=foo my_analyse.perform(use_optimizer=myOpt) The attribute

Re: [Numpy-discussion] whitespace in git repo

2010-10-20 Thread David Cournapeau
On Thu, Oct 21, 2010 at 12:56 AM, Friedrich Romstedt friedrichromst...@gmail.com wrote: 2010/10/20 Darren Dale dsdal...@gmail.com: On Wed, Oct 20, 2010 at 6:12 AM, Friedrich Romstedt friedrichromst...@gmail.com wrote: Due to Darren's config file the .nsi.in file made it with CRLF into the

Re: [Numpy-discussion] function name as parameter

2010-10-20 Thread Robert Kern
On Wed, Oct 20, 2010 at 16:49, Zachary Pincus zachary.pin...@yale.edu wrote: But why not have the user just pass in the relevant optObject from the pyOpt namespace (or some restricted namespace that just has the relevant functions exposed)? E.g. my_analysis.perform(optimizer=pyOpt.Amoeba)

[Numpy-discussion] dtype subarray comparison

2010-10-20 Thread Mark Wiebe
It turns out that when comparing dtypes, the subarray is currently ignored. This means you can get things like this: import numpy as np np.dtype(('f4',(6))) == np.dtype(('f4',(2,3))) True np.dtype(([('a','i4')],2)) == np.dtype(([('b','u2'),('c','i2')],2)) True which pretty clearly should be

Re: [Numpy-discussion] Count occurrences in a nested ndarray

2010-10-20 Thread Dewald Pieterse
On Wed, Oct 20, 2010 at 1:32 AM, Lutz Maibaum lutz.maib...@gmail.comwrote: On Oct 19, 2010, at 6:09 PM, Dewald Pieterse wrote: for xiter in range(xindex): for yiter in range(yindex): if edges[xiter,yiter,:] == [255,0,0]: groenpixelarea =