Re: [Numpy-discussion] Newbie trying to install NumPy

2013-05-18 Thread Johann Cohen-Tanugi
Hello Joe, I am not familiar with windows, but I believe that the Python(x,y) is here to help you : http://code.google.com/p/pythonxy/ HTH, Johann On 05/18/2013 07:11 AM, Joe Piccoli wrote: Hello, I've been trying to install NumPy to run with Eclipse on Windows Vista. After installing (I

Re: [Numpy-discussion] Comparing NumPy/IDL Performance

2011-09-26 Thread Johann Cohen-Tanugi
hi Keith, I do not think that your primary concern should be with this kind of speed test at this stage : 1/ rest assured that this sort of tests have been performed in other contexts, and you can always do some hard work on high level computing languages like IDL and python to improve

[Numpy-discussion] numpy oddity

2011-08-30 Thread Johann Cohen-Tanugi
I have numpy version 1.6.1 and I see the following behavior : In [380]: X Out[380]: 1.0476157527896641 In [381]: X.__class__ Out[381]: numpy.float64 In [382]: (2,3)*X Out[382]: (2, 3) In [383]: (2,3)/X Out[383]: array([ 1.90909691, 2.86364537]) In [384]: X=float(X) In [385]: (2,3)/X

Re: [Numpy-discussion] numpy oddity

2011-08-30 Thread Johann Cohen-Tanugi
On 08/30/2011 08:17 PM, Robert Kern wrote: On Tue, Aug 30, 2011 at 09:52, Charles R Harris charlesr.har...@gmail.com wrote: On Tue, Aug 30, 2011 at 8:33 AM, Johann Cohen-Tanugi johann.cohentan...@gmail.com wrote: I have numpy version 1.6.1 and I see the following behavior : In [380]: X

Re: [Numpy-discussion] numpy oddity

2011-08-30 Thread Johann Cohen-Tanugi
ok thanks a lot. Safe code is often better than over-smart code, so I would line up with Charles here. There is too much potential for ambiguity in expected behavior. Johann On 08/30/2011 09:06 PM, Robert Kern wrote: On Tue, Aug 30, 2011 at 13:58, Johann Cohen-Tanugi johann.cohentan

Re: [Numpy-discussion] short circuit != ?

2010-10-27 Thread Johann Cohen-Tanugi
how about np.any(a!=b) ?? On 10/27/2010 12:25 PM, Neal Becker wrote: Is there a way to get a short circuit != ? That is, compare 2 arrays but stop as soon as the first element comparison fails? I'm assuming that np.all (a != b) will _not_ do this, but will first compare all elements.

Re: [Numpy-discussion] short circuit != ?

2010-10-27 Thread Johann Cohen-Tanugi
On 10/27/2010 03:31 PM, Neal Becker wrote: Johann Cohen-Tanugi wrote: how about np.any(a!=b) ?? On 10/27/2010 12:25 PM, Neal Becker wrote: Is there a way to get a short circuit != ? That is, compare 2 arrays but stop as soon as the first element comparison fails? I'm

Re: [Numpy-discussion] function name as parameter

2010-10-21 Thread Johann Cohen-Tanugi
On 10/20/2010 11:49 PM, Zachary Pincus wrote: 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

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 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 eval(%s(%f

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] Finding Star Images on a Photo (Video chip) Plate?

2010-05-29 Thread Johann Cohen-Tanugi
I have used sextractor in the past : http://terapix.iap.fr/rubrique.php?id_rubrique=91/ Johann On 05/29/2010 08:29 PM, Wayne Watson wrote: I managed to find some FORTRAN code that is relevant. Algorithms for CCD Stellar Photometry,K. Mighell, Kitt Peak,

Re: [Numpy-discussion] crash at prompt exit after running test

2010-03-11 Thread Johann Cohen-Tanugi
/10/2010 08:59 AM, Pauli Virtanen wrote: Wed, 10 Mar 2010 15:40:04 +0100, Johann Cohen-Tanugi wrote: Pauli, isn't it hopeless to follow the execution of the source code when the crash actually occurs when I exit, and not when I execute. I would have to understand

Re: [Numpy-discussion] crash at prompt exit after running test

2010-03-11 Thread Johann Cohen-Tanugi
is your fix committed? On 03/11/2010 09:47 PM, Bruce Southey wrote: On 03/11/2010 02:01 PM, Johann Cohen-Tanugi wrote: hi there, I am adding this to this thread and not to the trac, because I am not sure whether it adds noise or a piece of info. I just downloaded the scipy trunk and built

Re: [Numpy-discussion] crash at prompt exit after running test

2010-03-10 Thread Johann Cohen-Tanugi
Ubuntu has a much shorter cycle of updates than Fedora, indeed. On 03/10/2010 06:27 AM, Charles R Harris wrote: On Tue, Mar 9, 2010 at 5:52 PM, Johann Cohen-Tanugi co...@lpta.in2p3.fr mailto:co...@lpta.in2p3.fr wrote: more fun : [co...@jarrett tests]$ pwd /home/cohen/sources

Re: [Numpy-discussion] crash at prompt exit after running test

2010-03-10 Thread Johann Cohen-Tanugi
On 03/10/2010 01:55 AM, Pauli Virtanen wrote: more fun : [co...@jarrett tests]$ pwd /home/cohen/sources/python/numpy/numpy/core/tests [co...@jarrett tests]$ python -c 'import test_ufunc' python: Modules/gcmodule.c:277: visit_decref: Assertion `gc-gc.gc_refs != 0' failed. Aborted (core

Re: [Numpy-discussion] crash at prompt exit after running test

2010-03-10 Thread Johann Cohen-Tanugi
http://projects.scipy.org/numpy/ticket/1425 for the bug trac well, I do feel challenged now... ;) J On 03/10/2010 03:11 PM, Pauli Virtanen wrote: Wed, 10 Mar 2010 10:28:07 +0100, Johann Cohen-Tanugi wrote: On 03/10/2010 01:55 AM, Pauli Virtanen wrote: more fun : [co...@jarrett

[Numpy-discussion] crash at prompt exit after running test

2010-03-09 Thread Johann Cohen-Tanugi
hi there, I just installed the current head of numpy and built it. trying python and then import numpy, and then CTRL-D to exit, all goes well. But doing the same with a numpy.test() before CTRL-D ends up in : clip Ran 2892 tests in 35.814s OK (KNOWNFAIL=4, SKIP=6) nose.result.TextTestResult

Re: [Numpy-discussion] crash at prompt exit after running test

2010-03-09 Thread Johann Cohen-Tanugi
I have tried to localize the core dump in vain any idea where I should look for it? I did not manage to catch it with pdb : [co...@jarrett ~]$ .local/bin/ipython Python 2.6.2 (r262:71600, Jan 25 2010, 18:46:45) Type copyright, credits or license for more information. IPython

Re: [Numpy-discussion] crash at prompt exit after running test

2010-03-09 Thread Johann Cohen-Tanugi
thanks Robert, here it is : exit() python: Modules/gcmodule.c:277: visit_decref: Assertion `gc-gc.gc_refs != 0' failed. Program received signal SIGABRT, Aborted. 0x004a1416 in __kernel_vsyscall () Missing separate debuginfos, use: debuginfo-install atlas-3.8.3-12.fc12.i686

Re: [Numpy-discussion] crash at prompt exit after running test

2010-03-09 Thread Johann Cohen-Tanugi
thinking about it, this morning there was a fedora update to python, so I am using 2.6.2-4.fc12. Looks like the problem is in python itself, hence this piece of info. HTH, Johann On 03/09/2010 09:07 PM, Johann Cohen-Tanugi wrote: thanks Robert, here it is : exit() python: Modules

Re: [Numpy-discussion] crash at prompt exit after running test

2010-03-09 Thread Johann Cohen-Tanugi
On 03/10/2010 12:07 AM, Pauli Virtanen wrote: ti, 2010-03-09 kello 21:14 +0100, Johann Cohen-Tanugi kirjoitti: thinking about it, this morning there was a fedora update to python, so I am using 2.6.2-4.fc12. Looks like the problem is in python itself, hence this piece of info

Re: [Numpy-discussion] crash at prompt exit after running test

2010-03-09 Thread Johann Cohen-Tanugi
On 03/10/2010 12:33 AM, Johann Cohen-Tanugi wrote: On 03/10/2010 12:07 AM, Pauli Virtanen wrote: ti, 2010-03-09 kello 21:14 +0100, Johann Cohen-Tanugi kirjoitti: thinking about it, this morning there was a fedora update to python, so I am using 2.6.2-4.fc12. Looks like the problem

Re: [Numpy-discussion] crash at prompt exit after running test

2010-03-09 Thread Johann Cohen-Tanugi
identical to the bt I sent to Robert earlier on. HTH, Johann On 03/10/2010 12:43 AM, Johann Cohen-Tanugi wrote: On 03/10/2010 12:33 AM, Johann Cohen-Tanugi wrote: On 03/10/2010 12:07 AM, Pauli Virtanen wrote: ti, 2010-03-09 kello 21:14 +0100, Johann Cohen-Tanugi kirjoitti: thinking about