Re: [Numpy-discussion] NumPy v1.13.0rc1 released.

2017-05-11 Thread Nadav Horesh
There is a change to "expand_dims" function, that it is now does not allow axis 
= a.ndims.

This influences matplotlib function get_bending_matrices in triinterpolate.py


  Nadav


From: NumPy-Discussion 
 on behalf of 
Charles R Harris 
Sent: 11 May 2017 04:48:34
To: numpy-discussion; SciPy-User; SciPy Developers List; 
python-announce-l...@python.org
Subject: [Numpy-discussion] NumPy v1.13.0rc1 released.

Hi All,

I'm please to announce the NumPy 1.13.0rc1 release. This release supports 
Python 2.7 and 3.4-3.6 and contains many new features. It is one of the most 
ambitious releases in the last several years. Some of the highlights and new 
functions are

Highlights

  *   Operations like ``a + b + c`` will reuse temporaries on some platforms, 
resulting in less memory use and faster execution.
  *   Inplace operations check if inputs overlap outputs and create temporaries 
to avoid problems.
  *   New __array_ufunc__ attribute provides improved ability for classes to 
override default ufunc behavior.
  *New np.block function for creating blocked arrays.

New functions

  *   New ``np.positive`` ufunc.
  *   New ``np.divmod`` ufunc provides more efficient divmod.
  *   New ``np.isnat`` ufunc tests for NaT special values.
  *   New ``np.heaviside`` ufunc computes the Heaviside function.
  *   New ``np.isin`` function, improves on ``in1d``.
  *   New ``np.block`` function for creating blocked arrays.
  *   New ``PyArray_MapIterArrayCopyIfOverlap`` added to NumPy C-API.

Wheels for the pre-release are available on PyPI. Source tarballs, zipfiles, 
release notes, and the Changelog are available on 
github.

A total of 100 people contributed to this release.  People with a "+" by their
names contributed a patch for the first time.

  *   A. Jesse Jiryu Davis +
  *   Alessandro Pietro Bardelli +
  *   Alex Rothberg +
  *   Alexander Shadchin
  *   Allan Haldane
  *   Andres Guzman-Ballen +
  *   Antoine Pitrou
  *   Antony Lee
  *   B R S Recht +
  *   Baurzhan Muftakhidinov +
  *   Ben Rowland
  *   Benda Xu +
  *   Blake Griffith
  *   Bradley Wogsland +
  *   Brandon Carter +
  *   CJ Carey
  *   Charles Harris
  *   Danny Hermes +
  *   Duke Vijitbenjaronk +
  *   Egor Klenin +
  *   Elliott Forney +
  *   Elliott M Forney +
  *   Endolith
  *   Eric Wieser
  *   Erik M. Bray
  *   Eugene +
  *   Evan Limanto +
  *   Felix Berkenkamp +
  *   François Bissey +
  *   Frederic Bastien
  *   Greg Young
  *   Gregory R. Lee
  *   Importance of Being Ernest +
  *   Jaime Fernandez
  *   Jakub Wilk +
  *   James Cowgill +
  *   James Sanders
  *   Jean Utke +
  *   Jesse Thoren +
  *   Jim Crist +
  *   Joerg Behrmann +
  *   John Kirkham
  *   Jonathan Helmus
  *   Jonathan L Long
  *   Jonathan Tammo Siebert +
  *   Joseph Fox-Rabinovitz
  *   Joshua Loyal +
  *   Juan Nunez-Iglesias +
  *   Julian Taylor
  *   Kirill Balunov +
  *   Likhith Chitneni +
  *   Loïc Estève
  *   Mads Ohm Larsen
  *   Marein Könings +
  *   Marten van Kerkwijk
  *   Martin Thoma
  *   Martino Sorbaro +
  *   Marvin Schmidt +
  *   Matthew Brett
  *   Matthias Bussonnier +
  *   Matthias C. M. Troffaes +
  *   Matti Picus
  *   Michael Seifert
  *   Mikhail Pak +
  *   Mortada Mehyar
  *   Nathaniel J. Smith
  *   Nick Papior
  *   Oscar Villellas +
  *   Pauli Virtanen
  *   Pavel Potocek
  *   Pete Peeradej Tanruangporn +
  *   Philipp A +
  *   Ralf Gommers
  *   Robert Kern
  *   Roland Kaufmann +
  *   Ronan Lamy
  *   Sami Salonen +
  *   Sanchez Gonzalez Alvaro
  *   Sebastian Berg
  *   Shota Kawabuchi
  *   Simon Gibbons
  *   Stefan Otte
  *   Stefan Peterson +
  *   Stephan Hoyer
  *   Søren Fuglede Jørgensen +
  *   Takuya Akiba
  *   Tom Boyd +
  *   Ville Skyttä +
  *   Warren Weckesser
  *   Wendell Smith
  *   Yu Feng
  *   Zixu Zhao +
  *   Zè Vinícius +
  *   aha66 +
  *   davidjn +
  *   drabach +
  *   drlvk +
  *   jsh9 +
  *   solarjoe +
  *   zengi +

Cheers,

Chuck
___
NumPy-Discussion mailing list
NumPy-Discussion@python.org
https://mail.python.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] NumPy v1.13.0rc1 released.

2017-05-11 Thread Eric Wieser
Nadav: Can you provide a testcase that fails?

I don't think you're correct - it works just fine when `axis = a.ndims` -
the issue arises when `axis > a.ndims`, but I'd argue that in that case an
error is correct behaviour. But still a change, so perhaps needs a release
note entry

On Thu, 11 May 2017 at 14:25 Nadav Horesh  wrote:

> There is a change to "expand_dims" function, that it is now does not allow
> axis = a.ndims.
>
> This influences matplotlib function get_bending_matrices in
> triinterpolate.py
>
>
>   Nadav
> --
> *From:* NumPy-Discussion  visionsense@python.org> on behalf of Charles R Harris <
> charlesr.har...@gmail.com>
> *Sent:* 11 May 2017 04:48:34
> *To:* numpy-discussion; SciPy-User; SciPy Developers List;
> python-announce-l...@python.org
> *Subject:* [Numpy-discussion] NumPy v1.13.0rc1 released.
>
> Hi All,
>
> I'm please to announce the NumPy 1.13.0rc1 release. This release supports
> Python 2.7 and 3.4-3.6 and contains many new features. It is one of the
> most ambitious releases in the last several years. Some of the highlights
> and new functions are
>
> *Highlights*
>
>- Operations like ``a + b + c`` will reuse temporaries on some
>platforms, resulting in less memory use and faster execution.
>- Inplace operations check if inputs overlap outputs and create
>temporaries to avoid problems.
>- New __array_ufunc__ attribute provides improved ability for classes
>to override default ufunc behavior.
>-  New np.block function for creating blocked arrays.
>
>
> *New functions*
>
>- New ``np.positive`` ufunc.
>- New ``np.divmod`` ufunc provides more efficient divmod.
>- New ``np.isnat`` ufunc tests for NaT special values.
>- New ``np.heaviside`` ufunc computes the Heaviside function.
>- New ``np.isin`` function, improves on ``in1d``.
>- New ``np.block`` function for creating blocked arrays.
>- New ``PyArray_MapIterArrayCopyIfOverlap`` added to NumPy C-API.
>
> Wheels for the pre-release are available on PyPI. Source tarballs,
> zipfiles, release notes, and the Changelog are available on github
> .
>
> A total of 100 people contributed to this release.  People with a "+" by
> their
> names contributed a patch for the first time.
>
>- A. Jesse Jiryu Davis +
>- Alessandro Pietro Bardelli +
>- Alex Rothberg +
>- Alexander Shadchin
>- Allan Haldane
>- Andres Guzman-Ballen +
>- Antoine Pitrou
>- Antony Lee
>- B R S Recht +
>- Baurzhan Muftakhidinov +
>- Ben Rowland
>- Benda Xu +
>- Blake Griffith
>- Bradley Wogsland +
>- Brandon Carter +
>- CJ Carey
>- Charles Harris
>- Danny Hermes +
>- Duke Vijitbenjaronk +
>- Egor Klenin +
>- Elliott Forney +
>- Elliott M Forney +
>- Endolith
>- Eric Wieser
>- Erik M. Bray
>- Eugene +
>- Evan Limanto +
>- Felix Berkenkamp +
>- François Bissey +
>- Frederic Bastien
>- Greg Young
>- Gregory R. Lee
>- Importance of Being Ernest +
>- Jaime Fernandez
>- Jakub Wilk +
>- James Cowgill +
>- James Sanders
>- Jean Utke +
>- Jesse Thoren +
>- Jim Crist +
>- Joerg Behrmann +
>- John Kirkham
>- Jonathan Helmus
>- Jonathan L Long
>- Jonathan Tammo Siebert +
>- Joseph Fox-Rabinovitz
>- Joshua Loyal +
>- Juan Nunez-Iglesias +
>- Julian Taylor
>- Kirill Balunov +
>- Likhith Chitneni +
>- Loïc Estève
>- Mads Ohm Larsen
>- Marein Könings +
>- Marten van Kerkwijk
>- Martin Thoma
>- Martino Sorbaro +
>- Marvin Schmidt +
>- Matthew Brett
>- Matthias Bussonnier +
>- Matthias C. M. Troffaes +
>- Matti Picus
>- Michael Seifert
>- Mikhail Pak +
>- Mortada Mehyar
>- Nathaniel J. Smith
>- Nick Papior
>- Oscar Villellas +
>- Pauli Virtanen
>- Pavel Potocek
>- Pete Peeradej Tanruangporn +
>- Philipp A +
>- Ralf Gommers
>- Robert Kern
>- Roland Kaufmann +
>- Ronan Lamy
>- Sami Salonen +
>- Sanchez Gonzalez Alvaro
>- Sebastian Berg
>- Shota Kawabuchi
>- Simon Gibbons
>- Stefan Otte
>- Stefan Peterson +
>- Stephan Hoyer
>- Søren Fuglede Jørgensen +
>- Takuya Akiba
>- Tom Boyd +
>- Ville Skyttä +
>- Warren Weckesser
>- Wendell Smith
>- Yu Feng
>- Zixu Zhao +
>- Zè Vinícius +
>- aha66 +
>- davidjn +
>- drabach +
>- drlvk +
>- jsh9 +
>- solarjoe +
>- zengi +
>
> Cheers,
>
> Chuck
> ___
> NumPy-Discussion mailing list
> NumPy-Discussion@python.org
> https://mail.python.org/mailman/listinfo/numpy-discussion
>
___
NumPy-Discussion mailing list
NumPy-Discussion@python.org
https://mail.python.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] NumPy v1.13.0rc1 released.

2017-05-11 Thread Stephan Hoyer
Also, as friendly reminder, GitHub is a better place for bug reports than
mailing lists with hundreds of subscribers :).

On Thu, May 11, 2017 at 6:56 AM, Eric Wieser 
wrote:

> Nadav: Can you provide a testcase that fails?
>
> I don't think you're correct - it works just fine when `axis = a.ndims` -
> the issue arises when `axis > a.ndims`, but I'd argue that in that case an
> error is correct behaviour. But still a change, so perhaps needs a release
> note entry
>
> On Thu, 11 May 2017 at 14:25 Nadav Horesh  wrote:
>
>> There is a change to "expand_dims" function, that it is now does not
>> allow axis = a.ndims.
>>
>> This influences matplotlib function get_bending_matrices in
>> triinterpolate.py
>>
>>
>>   Nadav
>> --
>> *From:* NumPy-Discussion > visionsense@python.org> on behalf of Charles R Harris <
>> charlesr.har...@gmail.com>
>> *Sent:* 11 May 2017 04:48:34
>> *To:* numpy-discussion; SciPy-User; SciPy Developers List;
>> python-announce-l...@python.org
>> *Subject:* [Numpy-discussion] NumPy v1.13.0rc1 released.
>>
>> Hi All,
>>
>> I'm please to announce the NumPy 1.13.0rc1 release. This release supports
>> Python 2.7 and 3.4-3.6 and contains many new features. It is one of the
>> most ambitious releases in the last several years. Some of the highlights
>> and new functions are
>>
>> *Highlights*
>>
>>- Operations like ``a + b + c`` will reuse temporaries on some
>>platforms, resulting in less memory use and faster execution.
>>- Inplace operations check if inputs overlap outputs and create
>>temporaries to avoid problems.
>>- New __array_ufunc__ attribute provides improved ability for classes
>>to override default ufunc behavior.
>>-  New np.block function for creating blocked arrays.
>>
>>
>> *New functions*
>>
>>- New ``np.positive`` ufunc.
>>- New ``np.divmod`` ufunc provides more efficient divmod.
>>- New ``np.isnat`` ufunc tests for NaT special values.
>>- New ``np.heaviside`` ufunc computes the Heaviside function.
>>- New ``np.isin`` function, improves on ``in1d``.
>>- New ``np.block`` function for creating blocked arrays.
>>- New ``PyArray_MapIterArrayCopyIfOverlap`` added to NumPy C-API.
>>
>> Wheels for the pre-release are available on PyPI. Source tarballs,
>> zipfiles, release notes, and the Changelog are available on github
>> .
>>
>> A total of 100 people contributed to this release.  People with a "+" by
>> their
>> names contributed a patch for the first time.
>>
>>- A. Jesse Jiryu Davis +
>>- Alessandro Pietro Bardelli +
>>- Alex Rothberg +
>>- Alexander Shadchin
>>- Allan Haldane
>>- Andres Guzman-Ballen +
>>- Antoine Pitrou
>>- Antony Lee
>>- B R S Recht +
>>- Baurzhan Muftakhidinov +
>>- Ben Rowland
>>- Benda Xu +
>>- Blake Griffith
>>- Bradley Wogsland +
>>- Brandon Carter +
>>- CJ Carey
>>- Charles Harris
>>- Danny Hermes +
>>- Duke Vijitbenjaronk +
>>- Egor Klenin +
>>- Elliott Forney +
>>- Elliott M Forney +
>>- Endolith
>>- Eric Wieser
>>- Erik M. Bray
>>- Eugene +
>>- Evan Limanto +
>>- Felix Berkenkamp +
>>- François Bissey +
>>- Frederic Bastien
>>- Greg Young
>>- Gregory R. Lee
>>- Importance of Being Ernest +
>>- Jaime Fernandez
>>- Jakub Wilk +
>>- James Cowgill +
>>- James Sanders
>>- Jean Utke +
>>- Jesse Thoren +
>>- Jim Crist +
>>- Joerg Behrmann +
>>- John Kirkham
>>- Jonathan Helmus
>>- Jonathan L Long
>>- Jonathan Tammo Siebert +
>>- Joseph Fox-Rabinovitz
>>- Joshua Loyal +
>>- Juan Nunez-Iglesias +
>>- Julian Taylor
>>- Kirill Balunov +
>>- Likhith Chitneni +
>>- Loïc Estève
>>- Mads Ohm Larsen
>>- Marein Könings +
>>- Marten van Kerkwijk
>>- Martin Thoma
>>- Martino Sorbaro +
>>- Marvin Schmidt +
>>- Matthew Brett
>>- Matthias Bussonnier +
>>- Matthias C. M. Troffaes +
>>- Matti Picus
>>- Michael Seifert
>>- Mikhail Pak +
>>- Mortada Mehyar
>>- Nathaniel J. Smith
>>- Nick Papior
>>- Oscar Villellas +
>>- Pauli Virtanen
>>- Pavel Potocek
>>- Pete Peeradej Tanruangporn +
>>- Philipp A +
>>- Ralf Gommers
>>- Robert Kern
>>- Roland Kaufmann +
>>- Ronan Lamy
>>- Sami Salonen +
>>- Sanchez Gonzalez Alvaro
>>- Sebastian Berg
>>- Shota Kawabuchi
>>- Simon Gibbons
>>- Stefan Otte
>>- Stefan Peterson +
>>- Stephan Hoyer
>>- Søren Fuglede Jørgensen +
>>- Takuya Akiba
>>- Tom Boyd +
>>- Ville Skyttä +
>>- Warren Weckesser
>>- Wendell Smith
>>- Yu Feng
>>- Zixu Zhao +
>>- Zè Vinícius +
>>- aha66 +
>>- davidjn +
>>- drabach +
>>- drlvk +
>>- jsh9 +
>>- solarjoe +
>>- zengi +
>>
>> Cheers,
>>
>> Chuck
>> ___

[Numpy-discussion] How to concatenate 2 recarrays into a single recarray

2017-05-11 Thread Isaac Gerg
I have 2 arrays, a and b which are rec arrays of length 10.  Each array has
5 columns.

I would like to combine all the columns into a single recarray with 10
columns and length 10.

Thanks,
Isaac
___
NumPy-Discussion mailing list
NumPy-Discussion@python.org
https://mail.python.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] How to concatenate 2 recarrays into a single recarray

2017-05-11 Thread Isaac Xin Pei
Check Pandas pd.concate ?
On Thu, May 11, 2017 at 12:45 PM Isaac Gerg  wrote:

> I have 2 arrays, a and b which are rec arrays of length 10.  Each array
> has 5 columns.
>
> I would like to combine all the columns into a single recarray with 10
> columns and length 10.
>
> Thanks,
> Isaac
> ___
> NumPy-Discussion mailing list
> NumPy-Discussion@python.org
> https://mail.python.org/mailman/listinfo/numpy-discussion
>
___
NumPy-Discussion mailing list
NumPy-Discussion@python.org
https://mail.python.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] How to concatenate 2 recarrays into a single recarray

2017-05-11 Thread Isaac Gerg
I'd prefer to stay in numpy land if possible.

On Thu, May 11, 2017 at 1:17 PM, Isaac Xin Pei  wrote:

> Check Pandas pd.concate ?
> On Thu, May 11, 2017 at 12:45 PM Isaac Gerg 
> wrote:
>
>> I have 2 arrays, a and b which are rec arrays of length 10.  Each array
>> has 5 columns.
>>
>> I would like to combine all the columns into a single recarray with 10
>> columns and length 10.
>>
>> Thanks,
>> Isaac
>> ___
>> NumPy-Discussion mailing list
>> NumPy-Discussion@python.org
>> https://mail.python.org/mailman/listinfo/numpy-discussion
>>
>
> ___
> NumPy-Discussion mailing list
> NumPy-Discussion@python.org
> https://mail.python.org/mailman/listinfo/numpy-discussion
>
>
___
NumPy-Discussion mailing list
NumPy-Discussion@python.org
https://mail.python.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] How to concatenate 2 recarrays into a single recarray

2017-05-11 Thread Benjamin Root
Check in numpy.recfunctions. I know there is merge_arrays() and
stack_arrays(). I forget which one does what.

Cheers!
Ben Root


On Thu, May 11, 2017 at 1:51 PM, Isaac Gerg  wrote:

> I'd prefer to stay in numpy land if possible.
>
> On Thu, May 11, 2017 at 1:17 PM, Isaac Xin Pei  wrote:
>
>> Check Pandas pd.concate ?
>> On Thu, May 11, 2017 at 12:45 PM Isaac Gerg 
>> wrote:
>>
>>> I have 2 arrays, a and b which are rec arrays of length 10.  Each array
>>> has 5 columns.
>>>
>>> I would like to combine all the columns into a single recarray with 10
>>> columns and length 10.
>>>
>>> Thanks,
>>> Isaac
>>> ___
>>> NumPy-Discussion mailing list
>>> NumPy-Discussion@python.org
>>> https://mail.python.org/mailman/listinfo/numpy-discussion
>>>
>>
>> ___
>> NumPy-Discussion mailing list
>> NumPy-Discussion@python.org
>> https://mail.python.org/mailman/listinfo/numpy-discussion
>>
>>
>
> ___
> NumPy-Discussion mailing list
> NumPy-Discussion@python.org
> https://mail.python.org/mailman/listinfo/numpy-discussion
>
>
___
NumPy-Discussion mailing list
NumPy-Discussion@python.org
https://mail.python.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] How to concatenate 2 recarrays into a single recarray

2017-05-11 Thread Isaac Gerg
newtable = np.lib.recfunctions.merge_arrays([a, b], asrecarray=True)

yeilds:

builtins.SystemError: ..\Objects\dictobject.c:2054: bad argument to
internal function

On Thu, May 11, 2017 at 2:02 PM, Benjamin Root  wrote:

> Check in numpy.recfunctions. I know there is merge_arrays() and
> stack_arrays(). I forget which one does what.
>
> Cheers!
> Ben Root
>
>
> On Thu, May 11, 2017 at 1:51 PM, Isaac Gerg 
> wrote:
>
>> I'd prefer to stay in numpy land if possible.
>>
>> On Thu, May 11, 2017 at 1:17 PM, Isaac Xin Pei 
>> wrote:
>>
>>> Check Pandas pd.concate ?
>>> On Thu, May 11, 2017 at 12:45 PM Isaac Gerg 
>>> wrote:
>>>
 I have 2 arrays, a and b which are rec arrays of length 10.  Each array
 has 5 columns.

 I would like to combine all the columns into a single recarray with 10
 columns and length 10.

 Thanks,
 Isaac
 ___
 NumPy-Discussion mailing list
 NumPy-Discussion@python.org
 https://mail.python.org/mailman/listinfo/numpy-discussion

>>>
>>> ___
>>> NumPy-Discussion mailing list
>>> NumPy-Discussion@python.org
>>> https://mail.python.org/mailman/listinfo/numpy-discussion
>>>
>>>
>>
>> ___
>> NumPy-Discussion mailing list
>> NumPy-Discussion@python.org
>> https://mail.python.org/mailman/listinfo/numpy-discussion
>>
>>
>
> ___
> NumPy-Discussion mailing list
> NumPy-Discussion@python.org
> https://mail.python.org/mailman/listinfo/numpy-discussion
>
>
___
NumPy-Discussion mailing list
NumPy-Discussion@python.org
https://mail.python.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] How to concatenate 2 recarrays into a single recarray

2017-05-11 Thread Eric Wieser
If that's the case, can you file an issue on github along with a minimal
example that produces the error, and the full stack trace?

On Thu, 11 May 2017 at 19:29 Isaac Gerg  wrote:

> newtable = np.lib.recfunctions.merge_arrays([a, b], asrecarray=True)
>
> yeilds:
>
> builtins.SystemError: ..\Objects\dictobject.c:2054: bad argument to
> internal function
>
> On Thu, May 11, 2017 at 2:02 PM, Benjamin Root 
> wrote:
>
>> Check in numpy.recfunctions. I know there is merge_arrays() and
>> stack_arrays(). I forget which one does what.
>>
>> Cheers!
>> Ben Root
>>
>>
>> On Thu, May 11, 2017 at 1:51 PM, Isaac Gerg 
>> wrote:
>>
>>> I'd prefer to stay in numpy land if possible.
>>>
>>> On Thu, May 11, 2017 at 1:17 PM, Isaac Xin Pei 
>>> wrote:
>>>
 Check Pandas pd.concate ?
 On Thu, May 11, 2017 at 12:45 PM Isaac Gerg 
 wrote:

> I have 2 arrays, a and b which are rec arrays of length 10.  Each
> array has 5 columns.
>
> I would like to combine all the columns into a single recarray with 10
> columns and length 10.
>
> Thanks,
> Isaac
> ___
> NumPy-Discussion mailing list
> NumPy-Discussion@python.org
> https://mail.python.org/mailman/listinfo/numpy-discussion
>

 ___
 NumPy-Discussion mailing list
 NumPy-Discussion@python.org
 https://mail.python.org/mailman/listinfo/numpy-discussion


>>>
>>> ___
>>> NumPy-Discussion mailing list
>>> NumPy-Discussion@python.org
>>> https://mail.python.org/mailman/listinfo/numpy-discussion
>>>
>>>
>>
>> ___
>> NumPy-Discussion mailing list
>> NumPy-Discussion@python.org
>> https://mail.python.org/mailman/listinfo/numpy-discussion
>>
>>
> ___
> NumPy-Discussion mailing list
> NumPy-Discussion@python.org
> https://mail.python.org/mailman/listinfo/numpy-discussion
>
___
NumPy-Discussion mailing list
NumPy-Discussion@python.org
https://mail.python.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] How to concatenate 2 recarrays into a single recarray

2017-05-11 Thread Isaac Gerg
Sure.

On Thu, May 11, 2017 at 2:31 PM, Eric Wieser 
wrote:

> If that's the case, can you file an issue on github along with a minimal
> example that produces the error, and the full stack trace?
>
> On Thu, 11 May 2017 at 19:29 Isaac Gerg  wrote:
>
>> newtable = np.lib.recfunctions.merge_arrays([a, b], asrecarray=True)
>>
>> yeilds:
>>
>> builtins.SystemError: ..\Objects\dictobject.c:2054: bad argument to
>> internal function
>>
>> On Thu, May 11, 2017 at 2:02 PM, Benjamin Root 
>> wrote:
>>
>>> Check in numpy.recfunctions. I know there is merge_arrays() and
>>> stack_arrays(). I forget which one does what.
>>>
>>> Cheers!
>>> Ben Root
>>>
>>>
>>> On Thu, May 11, 2017 at 1:51 PM, Isaac Gerg 
>>> wrote:
>>>
 I'd prefer to stay in numpy land if possible.

 On Thu, May 11, 2017 at 1:17 PM, Isaac Xin Pei 
 wrote:

> Check Pandas pd.concate ?
> On Thu, May 11, 2017 at 12:45 PM Isaac Gerg 
> wrote:
>
>> I have 2 arrays, a and b which are rec arrays of length 10.  Each
>> array has 5 columns.
>>
>> I would like to combine all the columns into a single recarray with
>> 10 columns and length 10.
>>
>> Thanks,
>> Isaac
>> ___
>> NumPy-Discussion mailing list
>> NumPy-Discussion@python.org
>> https://mail.python.org/mailman/listinfo/numpy-discussion
>>
>
> ___
> NumPy-Discussion mailing list
> NumPy-Discussion@python.org
> https://mail.python.org/mailman/listinfo/numpy-discussion
>
>

 ___
 NumPy-Discussion mailing list
 NumPy-Discussion@python.org
 https://mail.python.org/mailman/listinfo/numpy-discussion


>>>
>>> ___
>>> NumPy-Discussion mailing list
>>> NumPy-Discussion@python.org
>>> https://mail.python.org/mailman/listinfo/numpy-discussion
>>>
>>>
>> ___
>> NumPy-Discussion mailing list
>> NumPy-Discussion@python.org
>> https://mail.python.org/mailman/listinfo/numpy-discussion
>>
>
> ___
> NumPy-Discussion mailing list
> NumPy-Discussion@python.org
> https://mail.python.org/mailman/listinfo/numpy-discussion
>
>
___
NumPy-Discussion mailing list
NumPy-Discussion@python.org
https://mail.python.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] How to concatenate 2 recarrays into a single recarray

2017-05-11 Thread Isaac Gerg
Looking at the code, i think merge and stack take in ndarrays, not recarrays
is that correct?

On Thu, May 11, 2017 at 2:34 PM, Isaac Gerg  wrote:

> Sure.
>
> On Thu, May 11, 2017 at 2:31 PM, Eric Wieser 
> wrote:
>
>> If that's the case, can you file an issue on github along with a minimal
>> example that produces the error, and the full stack trace?
>>
>> On Thu, 11 May 2017 at 19:29 Isaac Gerg  wrote:
>>
>>> newtable = np.lib.recfunctions.merge_arrays([a, b], asrecarray=True)
>>>
>>> yeilds:
>>>
>>> builtins.SystemError: ..\Objects\dictobject.c:2054: bad argument to
>>> internal function
>>>
>>> On Thu, May 11, 2017 at 2:02 PM, Benjamin Root 
>>> wrote:
>>>
 Check in numpy.recfunctions. I know there is merge_arrays() and
 stack_arrays(). I forget which one does what.

 Cheers!
 Ben Root


 On Thu, May 11, 2017 at 1:51 PM, Isaac Gerg 
 wrote:

> I'd prefer to stay in numpy land if possible.
>
> On Thu, May 11, 2017 at 1:17 PM, Isaac Xin Pei 
> wrote:
>
>> Check Pandas pd.concate ?
>> On Thu, May 11, 2017 at 12:45 PM Isaac Gerg 
>> wrote:
>>
>>> I have 2 arrays, a and b which are rec arrays of length 10.  Each
>>> array has 5 columns.
>>>
>>> I would like to combine all the columns into a single recarray with
>>> 10 columns and length 10.
>>>
>>> Thanks,
>>> Isaac
>>> ___
>>> NumPy-Discussion mailing list
>>> NumPy-Discussion@python.org
>>> https://mail.python.org/mailman/listinfo/numpy-discussion
>>>
>>
>> ___
>> NumPy-Discussion mailing list
>> NumPy-Discussion@python.org
>> https://mail.python.org/mailman/listinfo/numpy-discussion
>>
>>
>
> ___
> NumPy-Discussion mailing list
> NumPy-Discussion@python.org
> https://mail.python.org/mailman/listinfo/numpy-discussion
>
>

 ___
 NumPy-Discussion mailing list
 NumPy-Discussion@python.org
 https://mail.python.org/mailman/listinfo/numpy-discussion


>>> ___
>>> NumPy-Discussion mailing list
>>> NumPy-Discussion@python.org
>>> https://mail.python.org/mailman/listinfo/numpy-discussion
>>>
>>
>> ___
>> NumPy-Discussion mailing list
>> NumPy-Discussion@python.org
>> https://mail.python.org/mailman/listinfo/numpy-discussion
>>
>>
>
___
NumPy-Discussion mailing list
NumPy-Discussion@python.org
https://mail.python.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] NumPy v1.13.0rc1 released.

2017-05-11 Thread Marten van Kerkwijk
Hi All,

Do indeed try __array_ufunc__! It should make many things work much
better and possibly faster than was possible with __array_prepare__
and __array_wrap__ (for astropy's Quantity, an ndarray subclass than I
maintain, it gets us a factor of almost 2 in speed for operations
where scaling for units is needed; for array-like classes, it should
enable things that were nearlyimpossible before).

About documentation, I'm not quite sure how to get the documentation
on scipy.docs.org to update (the developer version points points to
1.13dev0 and is last updated in January). Beyond the links Nathaniel
sent, there is also one more specifically aimed at subclasses:

 https://github.com/numpy/numpy/blob/master/numpy/doc/subclassing.py

As noted, the API is provisional, which I hope it all the more reason
to try it out if you think this could be useful -- and do let us know
on github what works and what doesn't [e.g., there is a lively
discussion on whether `ndarray` having its own `__array_ufunc__` for
subclasses to super to is in fact a good idea -- for Quantity, I find
it quite convenient (but then I implemented it...), but perhaps it is
too confusing.  See

https://github.com/numpy/numpy/issues/9079

All the best,

Marten
___
NumPy-Discussion mailing list
NumPy-Discussion@python.org
https://mail.python.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] How to concatenate 2 recarrays into a single recarray

2017-05-11 Thread Derek Homeier
On 11 May 2017, at 8:52 pm, Isaac Gerg  wrote:
> 
> Looking at the code, i think merge and stack take in ndarrays, not recarrays
> is that correct?

It should accept either; however if your a and b are two recarrays with all 
uniquely named columns
to get the 10-column recarray in your original example you should do

newtable = np.lib.recfunctions.merge_arrays([a, b], flatten=True, 
asrecarray=True)

otherwise newtable will be a recarray of two columns with 5 nested subcolumns 
each
(i.e. each column will have a dtype [(‘col0’, ‘https://mail.python.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] How to concatenate 2 recarrays into a single recarray

2017-05-11 Thread Eric Wieser
Even if you solve your own problem, please do - a SystemError is 100% a
mistake in numpy, and should never be raised from python code, even if you
call a numpy function with the wrong inputs.

Eric

On Thu, 11 May 2017 at 19:35 Isaac Gerg  wrote:

> Sure.
>
> On Thu, May 11, 2017 at 2:31 PM, Eric Wieser 
> wrote:
>
>> If that's the case, can you file an issue on github along with a minimal
>> example that produces the error, and the full stack trace?
>>
>> On Thu, 11 May 2017 at 19:29 Isaac Gerg  wrote:
>>
>>> newtable = np.lib.recfunctions.merge_arrays([a, b], asrecarray=True)
>>>
>>> yeilds:
>>>
>>> builtins.SystemError: ..\Objects\dictobject.c:2054: bad argument to
>>> internal function
>>>
>>> On Thu, May 11, 2017 at 2:02 PM, Benjamin Root 
>>> wrote:
>>>
 Check in numpy.recfunctions. I know there is merge_arrays() and
 stack_arrays(). I forget which one does what.

 Cheers!
 Ben Root


 On Thu, May 11, 2017 at 1:51 PM, Isaac Gerg 
 wrote:

> I'd prefer to stay in numpy land if possible.
>
> On Thu, May 11, 2017 at 1:17 PM, Isaac Xin Pei 
> wrote:
>
>> Check Pandas pd.concate ?
>> On Thu, May 11, 2017 at 12:45 PM Isaac Gerg 
>> wrote:
>>
>>> I have 2 arrays, a and b which are rec arrays of length 10.  Each
>>> array has 5 columns.
>>>
>>> I would like to combine all the columns into a single recarray with
>>> 10 columns and length 10.
>>>
>>> Thanks,
>>> Isaac
>>> ___
>>> NumPy-Discussion mailing list
>>> NumPy-Discussion@python.org
>>> https://mail.python.org/mailman/listinfo/numpy-discussion
>>>
>>
>> ___
>> NumPy-Discussion mailing list
>> NumPy-Discussion@python.org
>> https://mail.python.org/mailman/listinfo/numpy-discussion
>>
>>
>
> ___
> NumPy-Discussion mailing list
> NumPy-Discussion@python.org
> https://mail.python.org/mailman/listinfo/numpy-discussion
>
>

 ___
 NumPy-Discussion mailing list
 NumPy-Discussion@python.org
 https://mail.python.org/mailman/listinfo/numpy-discussion


>>> ___
>>> NumPy-Discussion mailing list
>>> NumPy-Discussion@python.org
>>> https://mail.python.org/mailman/listinfo/numpy-discussion
>>>
>>
>> ___
>> NumPy-Discussion mailing list
>> NumPy-Discussion@python.org
>> https://mail.python.org/mailman/listinfo/numpy-discussion
>>
>>
> ___
> NumPy-Discussion mailing list
> NumPy-Discussion@python.org
> https://mail.python.org/mailman/listinfo/numpy-discussion
>
___
NumPy-Discussion mailing list
NumPy-Discussion@python.org
https://mail.python.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] How to concatenate 2 recarrays into a single recarray

2017-05-11 Thread Isaac Gerg
Will do. I'm working on my side to get a solution that works.  It seems
that when i use append_field i dont get a recarray back and when i call
asrecarray=True, i get an error.  once i fix this.  i will replicate the
error and post to github.

On Thu, May 11, 2017 at 5:07 PM, Eric Wieser 
wrote:

> Even if you solve your own problem, please do - a SystemError is 100% a
> mistake in numpy, and should never be raised from python code, even if you
> call a numpy function with the wrong inputs.
>
> Eric
>
>
> On Thu, 11 May 2017 at 19:35 Isaac Gerg  wrote:
>
>> Sure.
>>
>> On Thu, May 11, 2017 at 2:31 PM, Eric Wieser > > wrote:
>>
>>> If that's the case, can you file an issue on github along with a minimal
>>> example that produces the error, and the full stack trace?
>>>
>>> On Thu, 11 May 2017 at 19:29 Isaac Gerg  wrote:
>>>
 newtable = np.lib.recfunctions.merge_arrays([a, b], asrecarray=True)

 yeilds:

 builtins.SystemError: ..\Objects\dictobject.c:2054: bad argument to
 internal function

 On Thu, May 11, 2017 at 2:02 PM, Benjamin Root 
 wrote:

> Check in numpy.recfunctions. I know there is merge_arrays() and
> stack_arrays(). I forget which one does what.
>
> Cheers!
> Ben Root
>
>
> On Thu, May 11, 2017 at 1:51 PM, Isaac Gerg 
> wrote:
>
>> I'd prefer to stay in numpy land if possible.
>>
>> On Thu, May 11, 2017 at 1:17 PM, Isaac Xin Pei 
>> wrote:
>>
>>> Check Pandas pd.concate ?
>>> On Thu, May 11, 2017 at 12:45 PM Isaac Gerg 
>>> wrote:
>>>
 I have 2 arrays, a and b which are rec arrays of length 10.  Each
 array has 5 columns.

 I would like to combine all the columns into a single recarray with
 10 columns and length 10.

 Thanks,
 Isaac
 ___
 NumPy-Discussion mailing list
 NumPy-Discussion@python.org
 https://mail.python.org/mailman/listinfo/numpy-discussion

>>>
>>> ___
>>> NumPy-Discussion mailing list
>>> NumPy-Discussion@python.org
>>> https://mail.python.org/mailman/listinfo/numpy-discussion
>>>
>>>
>>
>> ___
>> NumPy-Discussion mailing list
>> NumPy-Discussion@python.org
>> https://mail.python.org/mailman/listinfo/numpy-discussion
>>
>>
>
> ___
> NumPy-Discussion mailing list
> NumPy-Discussion@python.org
> https://mail.python.org/mailman/listinfo/numpy-discussion
>
>
 ___
 NumPy-Discussion mailing list
 NumPy-Discussion@python.org
 https://mail.python.org/mailman/listinfo/numpy-discussion

>>>
>>> ___
>>> NumPy-Discussion mailing list
>>> NumPy-Discussion@python.org
>>> https://mail.python.org/mailman/listinfo/numpy-discussion
>>>
>>>
>> ___
>> NumPy-Discussion mailing list
>> NumPy-Discussion@python.org
>> https://mail.python.org/mailman/listinfo/numpy-discussion
>>
>
> ___
> NumPy-Discussion mailing list
> NumPy-Discussion@python.org
> https://mail.python.org/mailman/listinfo/numpy-discussion
>
>
___
NumPy-Discussion mailing list
NumPy-Discussion@python.org
https://mail.python.org/mailman/listinfo/numpy-discussion