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

2013-09-03 Thread David Cournapeau
On Wed, Sep 4, 2013 at 1:51 AM, Chris Barker - NOAA Federal < chris.bar...@noaa.gov> wrote: > FWIW, > > You all may know this already, but a "long" is 64 bit on most 64 bit > platforms, but 32 bit on Windows. > The correct solution in this context is to use (s)size_t, intptr_t and ptrdiff_t depen

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 wrote:

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 bac

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 wrote: > > > > On Tue, Sep 3, 2013 at 6:09 PM, Christoph Gohlke wrote: > >> On 9/3/2013 4:45 PM, Charles R Harris wrote: >> > >> > >> > >> > On Tue, Sep 3, 2013 at 5:40 PM, Christoph Gohlke > > > wrote: >> > >> > On 9/3/

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 wrote: On Tue, Sep 3, 2013 at 6:09 PM, Christoph Gohlke wrote: > On 9/3/2013

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 > mailto:charlesr.har...@gmail.com>> wrote: > > > > > On Tue, Sep 3, 2013 at 5:40 PM, Christoph Gohlke > wrote: > > On 9/3/2013 2:51 PM, Charles R Harris wr

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 wrote: > On 9/3/2013 4:45 PM, Charles R Harris wrote: > > > > > > > > On Tue, Sep 3, 2013 at 5:40 PM, Christoph Gohlke > > wrote: > > > > On 9/3/2013 2:51 PM, Charles R Harris wrote: > > > > > > > > > > >

[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 Christoph Gohlke
On 9/3/2013 4:45 PM, Charles R Harris wrote: > > > > On Tue, Sep 3, 2013 at 5:40 PM, Christoph Gohlke > wrote: > > On 9/3/2013 2:51 PM, Charles R Harris wrote: > > > > > > > > On Tue, Sep 3, 2013 at 3:23 PM, Christoph Gohlke >

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 wrote: > > > > On Tue, Sep 3, 2013 at 5:40 PM, Christoph Gohlke wrote: > >> On 9/3/2013 2:51 PM, Charles R Harris wrote: >> > >> > >> > >> > On Tue, Sep 3, 2013 at 3:23 PM, Christoph Gohlke > > > wrote: >> > >> > On 9/1/

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 > 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

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 wrote: > On 9/3/2013 2:51 PM, Charles R Harris wrote: > > > > > > > > On Tue, Sep 3, 2013 at 3:23 PM, Christoph Gohlke > > 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 2:51 PM, Charles R Harris wrote: > > > > On Tue, Sep 3, 2013 at 3:23 PM, Christoph Gohlke > 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

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 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 not

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 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 not

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 https://sourceforge.net/projects/numpy/files/NumPy/1.8.0b

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 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] 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 wrote: > > On Mon, Sep 2, 2013 at 4:21 PM, Gregorio Bastardo > wrote: > np.min_scalar_type([-1,256]) # int16 expected > > dtype('int32') > > > > Am I missing something? Anyone knows how to achieve the desired operation? > > The docstring st

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 fea