Re: [Numpy-discussion] find appropriate dtype based on a set of values

2013-09-03 Thread Gregorio Bastardo
Thanks Stéfan, your script works well. There's a small typo on line 12. I also discovered the functions 'np.iinfo' and 'np.finfo' for machine limits on integer/float types (a note for myself, you might be already familiar with them). After having read the docstring, I was only curious why this

Re: [Numpy-discussion] find appropriate dtype based on a set of values

2013-09-03 Thread Robert Kern
On Mon, Sep 2, 2013 at 3:55 PM, Stéfan van der Walt ste...@sun.ac.za wrote: On Mon, Sep 2, 2013 at 4:21 PM, Gregorio Bastardo gregorio.basta...@gmail.com wrote: np.min_scalar_type([-1,256]) # int16 expected dtype('int32') Am I missing something? Anyone knows how to achieve the desired

Re: [Numpy-discussion] find appropriate dtype based on a set of values

2013-09-03 Thread Stéfan van der Walt
On Tue, Sep 3, 2013 at 2:47 PM, Robert Kern robert.k...@gmail.com wrote: Here's one way of doing it: https://gist.github.com/stefanv/6413742 You can probably reduce the amount of work by only comparing a.min() and a.max() instead of the whole array. Thanks, fixed. Stéfan

Re: [Numpy-discussion] ANN: Numpy 1.8.0 beta 1 release

2013-09-03 Thread Christoph Gohlke
On 9/1/2013 9:54 AM, Charles R Harris wrote: Hi all, I'm happy to announce the first beta release of Numpy 1.8.0. Please try this beta and report any issues on the numpy-dev mailing list. Source tarballs and release notes can be found at

Re: [Numpy-discussion] ANN: Numpy 1.8.0 beta 1 release

2013-09-03 Thread Charles R Harris
On Tue, Sep 3, 2013 at 3:23 PM, Christoph Gohlke cgoh...@uci.edu wrote: On 9/1/2013 9:54 AM, Charles R Harris wrote: Hi all, I'm happy to announce the first beta release of Numpy 1.8.0. Please try this beta and report any issues on the numpy-dev mailing list. Source tarballs and release

Re: [Numpy-discussion] ANN: Numpy 1.8.0 beta 1 release

2013-09-03 Thread Charles R Harris
On Tue, Sep 3, 2013 at 3:23 PM, Christoph Gohlke cgoh...@uci.edu wrote: On 9/1/2013 9:54 AM, Charles R Harris wrote: Hi all, I'm happy to announce the first beta release of Numpy 1.8.0. Please try this beta and report any issues on the numpy-dev mailing list. Source tarballs and release

Re: [Numpy-discussion] ANN: Numpy 1.8.0 beta 1 release

2013-09-03 Thread Christoph Gohlke
On 9/3/2013 2:51 PM, Charles R Harris wrote: On Tue, Sep 3, 2013 at 3:23 PM, Christoph Gohlke cgoh...@uci.edu mailto:cgoh...@uci.edu wrote: On 9/1/2013 9:54 AM, Charles R Harris wrote: Hi all, I'm happy to announce the first beta release of Numpy 1.8.0.

Re: [Numpy-discussion] ANN: Numpy 1.8.0 beta 1 release

2013-09-03 Thread Charles R Harris
On Tue, Sep 3, 2013 at 5:40 PM, Christoph Gohlke cgoh...@uci.edu wrote: On 9/3/2013 2:51 PM, Charles R Harris wrote: On Tue, Sep 3, 2013 at 3:23 PM, Christoph Gohlke cgoh...@uci.edu mailto:cgoh...@uci.edu wrote: On 9/1/2013 9:54 AM, Charles R Harris wrote: Hi all,

Re: [Numpy-discussion] ANN: Numpy 1.8.0 beta 1 release

2013-09-03 Thread Christoph Gohlke
On 9/3/2013 4:32 PM, Charles R Harris wrote: On Tue, Sep 3, 2013 at 3:23 PM, Christoph Gohlke cgoh...@uci.edu mailto:cgoh...@uci.edu wrote: On 9/1/2013 9:54 AM, Charles R Harris wrote: Hi all, I'm happy to announce the first beta release of Numpy 1.8.0.

Re: [Numpy-discussion] ANN: Numpy 1.8.0 beta 1 release

2013-09-03 Thread Charles R Harris
On Tue, Sep 3, 2013 at 5:45 PM, Charles R Harris charlesr.har...@gmail.comwrote: On Tue, Sep 3, 2013 at 5:40 PM, Christoph Gohlke cgoh...@uci.edu wrote: On 9/3/2013 2:51 PM, Charles R Harris wrote: On Tue, Sep 3, 2013 at 3:23 PM, Christoph Gohlke cgoh...@uci.edu

Re: [Numpy-discussion] ANN: Numpy 1.8.0 beta 1 release

2013-09-03 Thread Christoph Gohlke
On 9/3/2013 4:45 PM, Charles R Harris wrote: On Tue, Sep 3, 2013 at 5:40 PM, Christoph Gohlke cgoh...@uci.edu mailto:cgoh...@uci.edu wrote: On 9/3/2013 2:51 PM, Charles R Harris wrote: On Tue, Sep 3, 2013 at 3:23 PM, Christoph Gohlke cgoh...@uci.edu

[Numpy-discussion] (no subject)

2013-09-03 Thread Carl Canuck
Hello, I'm new to numpy, and I'm a stuck on my first real project with it. I am trying to take the rfft of a numpy array, like this: my_rfft = numpy.fft.rfft(my_numpy_array) and replace the amplitudes that can be obtained with: my_amplitudes = numpy.abs(my_rfft) with amplitudes from an

Re: [Numpy-discussion] ANN: Numpy 1.8.0 beta 1 release

2013-09-03 Thread Charles R Harris
On Tue, Sep 3, 2013 at 6:09 PM, Christoph Gohlke cgoh...@uci.edu wrote: On 9/3/2013 4:45 PM, Charles R Harris wrote: On Tue, Sep 3, 2013 at 5:40 PM, Christoph Gohlke cgoh...@uci.edu mailto:cgoh...@uci.edu wrote: On 9/3/2013 2:51 PM, Charles R Harris wrote:

Re: [Numpy-discussion] ANN: Numpy 1.8.0 beta 1 release

2013-09-03 Thread Christoph Gohlke
On 9/3/2013 4:52 PM, Charles R Harris wrote: On Tue, Sep 3, 2013 at 5:45 PM, Charles R Harris charlesr.har...@gmail.com mailto:charlesr.har...@gmail.com wrote: On Tue, Sep 3, 2013 at 5:40 PM, Christoph Gohlke cgoh...@uci.edu mailto:cgoh...@uci.edu wrote: On 9/3/2013

Re: [Numpy-discussion] ANN: Numpy 1.8.0 beta 1 release

2013-09-03 Thread Chris Barker - NOAA Federal
FWIW, You all may know this already, but a long is 64 bit on most 64 bit platforms, but 32 bit on Windows. Can we start using stdint.h and int32_t and friends? -CHB On Sep 3, 2013, at 5:18 PM, Charles R Harris charlesr.har...@gmail.com wrote: On Tue, Sep 3, 2013 at 6:09 PM, Christoph

Re: [Numpy-discussion] ANN: Numpy 1.8.0 beta 1 release

2013-09-03 Thread Charles R Harris
On Tue, Sep 3, 2013 at 6:18 PM, Charles R Harris charlesr.har...@gmail.comwrote: On Tue, Sep 3, 2013 at 6:09 PM, Christoph Gohlke cgoh...@uci.edu wrote: On 9/3/2013 4:45 PM, Charles R Harris wrote: On Tue, Sep 3, 2013 at 5:40 PM, Christoph Gohlke cgoh...@uci.edu

Re: [Numpy-discussion] (no subject)

2013-09-03 Thread Cera, Tim
I am trying to take the rfft of a numpy array, like this: my_rfft = numpy.fft.rfft(my_numpy_array) and replace the amplitudes that can be obtained with: my_amplitudes = numpy.abs(my_rfft) with amplitudes from an arbitrary numpy array's rFFT, which is to then be converted back using

Re: [Numpy-discussion] (no subject)

2013-09-03 Thread Carl Canuck
Hi Tim, Brilliant! Many thanks... I think this is exactly what I need, I owe you a beer (or other beverage of your choice). I'm now going to lock myself in the basement until I can work out an implementation of this for my use-case :) /Carl On Tue, Sep 3, 2013 at 9:05 PM, Cera, Tim