Re: [Numpy-discussion] Custom dtypes without C -- or, a standard ndarray-like type

2014-09-24 Thread Travis Oliphant
This could actually be done by using the structured dtype pretty easily. The hard work would be improving the ufunc and generalized ufunc mechanism to handle structured data-types. Numba actually provides some of this already, so if you have NumPy + Numba you can do this sort of thing now. -Travis

[Numpy-discussion] Interpolation using `np.interp()` with periodic x-coordinates

2014-09-24 Thread Saullo Castro
>From the closed pull request PR #5109: https://github.com/numpy/numpy/pull/5109 it came out that the a good implementation would be adding a parameter `period`. I would like to know about the community's interest for this implementation. The modification are shown here: https://github.com/saul

Re: [Numpy-discussion] Changes to the generalized functions.

2014-09-24 Thread Charles R Harris
On Wed, Sep 24, 2014 at 2:54 PM, Jaime Fernández del Río < jaime.f...@gmail.com> wrote: > On Tue, Sep 23, 2014 at 4:31 PM, Charles R Harris < > charlesr.har...@gmail.com> wrote: > >> >> >> On Tue, Sep 23, 2014 at 4:59 PM, Charles R Harris < >> charlesr.har...@gmail.com> wrote: >> >>> Hi All, >>> >

Re: [Numpy-discussion] Changes to the generalized functions.

2014-09-24 Thread Jaime Fernández del Río
On Tue, Sep 23, 2014 at 4:31 PM, Charles R Harris wrote: > > > On Tue, Sep 23, 2014 at 4:59 PM, Charles R Harris < > charlesr.har...@gmail.com> wrote: > >> Hi All, >> >> The question has come up as the whether of not to treat the new gufunc >> behavior as a bug fix, keeping the old constructor na

Re: [Numpy-discussion] Add `nrows` to `genfromtxt`

2014-09-24 Thread Alan G Isaac
On 9/24/2014 2:52 PM, Jaime Fernández del Río wrote: > There is a PR in github that adds a new keyword to the genfromtxt function, > to limit the number of rows that actually get read in: > https://github.com/numpy/numpy/pull/5103 Sorry to come late to this party, but it seems to me that more ver

[Numpy-discussion] Add `nrows` to `genfromtxt`

2014-09-24 Thread Jaime Fernández del Río
There is a PR in github that adds a new keyword to the genfromtxt function, to limit the number of rows that actually get read in: https://github.com/numpy/numpy/pull/5103 It is mostly ready to go, and several devs have looked at it without complaining. Since it is an API change, I wanted to chec

[Numpy-discussion] Building numpy with OpenMP support

2014-09-24 Thread John
I am in the process of trying to build numpy with OpenMP support but have had several issues. Has anyone else built it with success that could offer some guidance in what needs to be passed at build time. For reference I am using Atlas 3.10.2 built with OpenMP as well (-F alg -fopenmp) Thanks, J

[Numpy-discussion] Round away from zero (towards +/- infinity)

2014-09-24 Thread T J
Is there a ufunc for rounding away from zero? Or do I need to do x2 = sign(x) * ceil(abs(x)) whenever I want to round away from zero? Maybe the following is better? x_ceil = ceil(x) x_floor = floor(x) x2 = where(x >= 0, x_ceil, x_floor) Python's round function goes away from zer

Re: [Numpy-discussion] Custom dtypes without C -- or, a standard ndarray-like type

2014-09-24 Thread Chris Barker
On Tue, Sep 23, 2014 at 4:40 AM, Eric Moore wrote: > Improving the dtype system requires working on c code. > yes -- it sure does. But I think that is a bit of a Red Herring. I'm barely competent in C, and don't like it much, but the real barrier to entry for me is not that it's in C, but that

[Numpy-discussion] PR #5109 - interpolation function for polar coordinates

2014-09-24 Thread Saullo Castro
Dear all, today I've submitted a pull request: https://github.com/numpy/numpy/pull/5109 in order to include an interpolation function for angular coordinates, since using np.interp for this purpose is cumbersome. I kindly ask for your feedback and/or questions. Greetings, Saullo ___