[Numpy-discussion] unclear output format for numpy.argmax()

2013-03-12 Thread soumen ganguly
Hello, There are some doubts that i have regarding the argmax() method of numpy.As described in reference doc's of numpy,argmax(axis=None,out=None) returns the indices of the maximum value along the given axis(In this case 0 is default). So, i tried to implement the method to a 2d array with

[Numpy-discussion] Vectorize and ufunc attribute

2013-03-12 Thread T J
Prior to 1.7, I had working compatibility code such as the following: if has_good_functions: # http://projects.scipy.org/numpy/ticket/1096 from numpy import logaddexp, logaddexp2 else: logaddexp = vectorize(_logaddexp, otypes=[numpy.float64]) logaddexp2 = vectorize(_logaddexp2,

Re: [Numpy-discussion] unclear output format for numpy.argmax()

2013-03-12 Thread Todd
On Tue, Mar 12, 2013 at 8:20 AM, soumen ganguly soumendotgang...@gmail.comwrote: Hello, There are some doubts that i have regarding the argmax() method of numpy.As described in reference doc's of numpy,argmax(axis=None,out=None) returns the indices of the maximum value along the given

[Numpy-discussion] Yes, this one again ImportError: No module named multiarray

2013-03-12 Thread Dinesh B Vadhia
I've been using Numpy/Scipy for 5 years so know a little on how to get around them. Recently, I've needed to either freeze or create executables with tools such as PyInstaller, Cython, Py2exe and others on both Windows (XP 32-bit, 7 64-bit) and Ubuntu (12.04) Linux (64-bit). The test program

Re: [Numpy-discussion] Yes, this one again ImportError: No module named multiarray

2013-03-12 Thread Aron Ahmadia
multiarray is an extension module that lives within numpy/core, that is, when, import multiarray is called, (and it's the first imported extension module in numpy), multiarray.ext (ext being dll on Windows I guess), gets dynamically loaded. No module named multiarray is indicating problems with

Re: [Numpy-discussion] Yes, this one again ImportError: No module named multiarray

2013-03-12 Thread Dinesh B Vadhia
Does that mean numpy won't work with freeze/create_executable type of tools or is there a workaround? From: Aron Ahmadia Sent: Tuesday, March 12, 2013 6:17 AM To: Discussion of Numerical Python Subject: Re: [Numpy-discussion] Yes,this one again ImportError: No module named multiarray

[Numpy-discussion] (@Pat Marion) Re: Yes, this one again ImportError: No module named multiarray

2013-03-12 Thread Aron Ahmadia
Pat Marion at Kitware did some work on this, I'm pinging him on the thread. A On Tue, Mar 12, 2013 at 2:05 PM, Dinesh B Vadhia dineshbvad...@hotmail.comwrote: ** Does that mean numpy won't work with freeze/create_executable type of tools or is there a workaround? *From:* Aron Ahmadia

Re: [Numpy-discussion] (@Pat Marion) Re: Yes, this one again ImportError: No module named multiarray

2013-03-12 Thread Pat Marion
Thanks for copying me, Aron. Hi Dinesh, I have a github project which demonstrates how to use numpy with freeze. The project's readme includes more information: https://github.com/patmarion/NumpyBuiltinExample It does require a small patch to CPython's import.c file. I haven't tried posted

Re: [Numpy-discussion] Vectorize and ufunc attribute

2013-03-12 Thread Bradley M. Froehle
T J: You may want to look into `numpy.frompyfunc` ( http://docs.scipy.org/doc/numpy/reference/generated/numpy.frompyfunc.html). -Brad On Tue, Mar 12, 2013 at 12:40 AM, T J tjhn...@gmail.com wrote: Prior to 1.7, I had working compatibility code such as the following: if has_good_functions:

Re: [Numpy-discussion] Adopt Mersenne Twister 64bit?

2013-03-12 Thread Nathaniel Smith
On Mon, Mar 11, 2013 at 9:46 AM, Robert Kern robert.k...@gmail.com wrote: On Sun, Mar 10, 2013 at 6:12 PM, Siu Kwan Lam s...@continuum.io wrote: My suggestion to overcome (1) and (2) is to allow the user to select between the two implementations (and possibly different algorithms in the

Re: [Numpy-discussion] Adopt Mersenne Twister 64bit?

2013-03-12 Thread Nathaniel Smith
On Tue, Mar 12, 2013 at 9:25 PM, Nathaniel Smith n...@pobox.com wrote: On Mon, Mar 11, 2013 at 9:46 AM, Robert Kern robert.k...@gmail.com wrote: On Sun, Mar 10, 2013 at 6:12 PM, Siu Kwan Lam s...@continuum.io wrote: My suggestion to overcome (1) and (2) is to allow the user to select between

Re: [Numpy-discussion] Yes, this one again ImportError: No module named multiarray

2013-03-12 Thread Chris Barker - NOAA Federal
On Tue, Mar 12, 2013 at 7:05 AM, Dinesh B Vadhia dineshbvad...@hotmail.com wrote: Does that mean numpy won't work with freeze/create_executable type of tools or is there a workaround? I've used numpy with py2exe and py2app out of the box with no issues ( actually, there is an issue with too

Re: [Numpy-discussion] Adopt Mersenne Twister 64bit?

2013-03-12 Thread josef . pktd
On Tue, Mar 12, 2013 at 5:27 PM, Nathaniel Smith n...@pobox.com wrote: On Tue, Mar 12, 2013 at 9:25 PM, Nathaniel Smith n...@pobox.com wrote: On Mon, Mar 11, 2013 at 9:46 AM, Robert Kern robert.k...@gmail.com wrote: On Sun, Mar 10, 2013 at 6:12 PM, Siu Kwan Lam s...@continuum.io wrote: My

Re: [Numpy-discussion] Adopt Mersenne Twister 64bit?

2013-03-12 Thread Neal Becker
Nathaniel Smith wrote: On Tue, Mar 12, 2013 at 9:25 PM, Nathaniel Smith n...@pobox.com wrote: On Mon, Mar 11, 2013 at 9:46 AM, Robert Kern robert.k...@gmail.com wrote: On Sun, Mar 10, 2013 at 6:12 PM, Siu Kwan Lam s...@continuum.io wrote: My suggestion to overcome (1) and (2) is to allow the

Re: [Numpy-discussion] Adopt Mersenne Twister 64bit?

2013-03-12 Thread Robert Kern
On Tue, Mar 12, 2013 at 10:38 PM, Neal Becker ndbeck...@gmail.com wrote: Nathaniel Smith wrote: On Tue, Mar 12, 2013 at 9:25 PM, Nathaniel Smith n...@pobox.com wrote: On Mon, Mar 11, 2013 at 9:46 AM, Robert Kern robert.k...@gmail.com wrote: On Sun, Mar 10, 2013 at 6:12 PM, Siu Kwan Lam

Re: [Numpy-discussion] Adopt Mersenne Twister 64bit?

2013-03-12 Thread Neal Becker
I guess I talked to you about 100 years ago about sharing state between numpy rng and code I have in c++ that wraps boost::random. So is there a C-api for this RandomState object I could use to call from c++? Maybe I could do something with that. The c++ code could invoke via the python api,

Re: [Numpy-discussion] Vectorize and ufunc attribute

2013-03-12 Thread T J
On Tue, Mar 12, 2013 at 9:59 AM, Bradley M. Froehle brad.froe...@gmail.comwrote: T J: You may want to look into `numpy.frompyfunc` ( http://docs.scipy.org/doc/numpy/reference/generated/numpy.frompyfunc.html ). Yeah that's better, but it doesn't respect the output type of the function. Be

Re: [Numpy-discussion] Adopt Mersenne Twister 64bit?

2013-03-12 Thread Neal Becker
Neal Becker wrote: I guess I talked to you about 100 years ago about sharing state between numpy rng and code I have in c++ that wraps boost::random. So is there a C-api for this RandomState object I could use to call from c++? Maybe I could do something with that. The c++ code could

Re: [Numpy-discussion] Adopt Mersenne Twister 64bit?

2013-03-12 Thread josef . pktd
On Tue, Mar 12, 2013 at 7:10 PM, Robert Kern robert.k...@gmail.com wrote: On Tue, Mar 12, 2013 at 10:38 PM, Neal Becker ndbeck...@gmail.com wrote: Nathaniel Smith wrote: On Tue, Mar 12, 2013 at 9:25 PM, Nathaniel Smith n...@pobox.com wrote: On Mon, Mar 11, 2013 at 9:46 AM, Robert Kern