Re: [Numpy-discussion] Best way to expose std::vector to be used with numpy

2014-10-13 Thread Ian Henriksen
On Mon, Oct 13, 2014 at 8:39 PM, Charles R Harris wrote: > > > On Mon, Oct 13, 2014 at 12:54 PM, Sebastian Berg < > sebast...@sipsolutions.net> wrote: > >> On Mo, 2014-10-13 at 13:35 +0200, Daniele Nicolodi wrote: >> > Hello, >> > >> > I have a C++ application that collects float, int or complex

Re: [Numpy-discussion] Best way to expose std::vector to be used with numpy

2014-10-13 Thread Charles R Harris
On Mon, Oct 13, 2014 at 12:54 PM, Sebastian Berg wrote: > On Mo, 2014-10-13 at 13:35 +0200, Daniele Nicolodi wrote: > > Hello, > > > > I have a C++ application that collects float, int or complex data in a > > possibly quite large std::vector. The application has some SWIG > > generated python wr

Re: [Numpy-discussion] Any interest in a generalized piecewise function?

2014-10-13 Thread Julian Taylor
it probably makes a bit more sense to have the input an optional argument but I don't think its worth it to add a new function for more or less cosmetic reasons. You can still support scalars by ignoring the first argument. Fill value should be fill_value and the default 0 as thats what the current

[Numpy-discussion] non-linear rebin function recipe?

2014-10-13 Thread RayS
Most of my work has used the Fourrier based method for "linear" rebin of evenly sampled time data of length m (say 1500) to a new number of samples n (say 2048); the delta time change per sample is a constant over the array. I'd like to test the effect a non-constant delta t, ie, stretching s

[Numpy-discussion] numpy 1.9.1 rc1 probably next weekend

2014-10-13 Thread Julian Taylor
hi, we have collected a couple bugfixes in the 1.9 branch that should get released soon. The most important bugs fixes will be: - fix matplotlibs build (#5067) - avoid triggering a compiler bug on redhat 5, gcc 4.1.2 (#5163) - fix compatibility of npy files between py2 and py3 on win32/64 (#5170)

Re: [Numpy-discussion] Best way to expose std::vector to be used with numpy

2014-10-13 Thread Sebastian Berg
On Mo, 2014-10-13 at 13:35 +0200, Daniele Nicolodi wrote: > Hello, > > I have a C++ application that collects float, int or complex data in a > possibly quite large std::vector. The application has some SWIG > generated python wrappers that expose this vector to python. However, > the standard way

Re: [Numpy-discussion] Detect if array has been transposed

2014-10-13 Thread Mads Ipsen
On 13/10/14 01:18, Nathaniel Smith wrote: > On Mon, Oct 13, 2014 at 12:07 AM, Pauli Virtanen wrote: >> 12.10.2014, 22:16, Eric Firing kirjoitti: >>> On 2014/10/12, 8:29 AM, Pauli Virtanen wrote: 12.10.2014, 20:19, Mads Ipsen kirjoitti: > Is there any way for me to detect (on the Python si

[Numpy-discussion] Best way to expose std::vector to be used with numpy

2014-10-13 Thread Daniele Nicolodi
Hello, I have a C++ application that collects float, int or complex data in a possibly quite large std::vector. The application has some SWIG generated python wrappers that expose this vector to python. However, the standard way in which SWIG exposes the data is to create a touple and pass this to

Re: [Numpy-discussion] Any interest in a generalized piecewise function?

2014-10-13 Thread Per.Brodtkorb
Ok, I will open a pull request. But before I do so, I would like to know what kind of pull request to make. Ideally I think the call signature for piecewise should be like this: def piecewise(condlist, funclist, xi=None, fillvalue=numpy.nan, args=(), **kw): or this: def piecewise(condlist, fun