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

Isaac Gerg isaac.gerg at gergltd.com
Thu May 11 17:17:08 EDT 2017


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 <wieser.eric+numpy at gmail.com>
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 <isaac.gerg at gergltd.com> wrote:
>
>> Sure.
>>
>> On Thu, May 11, 2017 at 2:31 PM, Eric Wieser <wieser.eric+numpy at gmail.com
>> > 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 <isaac.gerg at gergltd.com> 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 <ben.v.root at gmail.com>
>>>> 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 <isaac.gerg at gergltd.com>
>>>>> wrote:
>>>>>
>>>>>> I'd prefer to stay in numpy land if possible.
>>>>>>
>>>>>> On Thu, May 11, 2017 at 1:17 PM, Isaac Xin Pei <isaacpei at gmail.com>
>>>>>> wrote:
>>>>>>
>>>>>>> Check Pandas pd.concate ?
>>>>>>> On Thu, May 11, 2017 at 12:45 PM Isaac Gerg <isaac.gerg at gergltd.com>
>>>>>>> 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 at python.org
>>>>>>>> https://mail.python.org/mailman/listinfo/numpy-discussion
>>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> NumPy-Discussion mailing list
>>>>>>> NumPy-Discussion at python.org
>>>>>>> https://mail.python.org/mailman/listinfo/numpy-discussion
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> NumPy-Discussion mailing list
>>>>>> NumPy-Discussion at python.org
>>>>>> https://mail.python.org/mailman/listinfo/numpy-discussion
>>>>>>
>>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> NumPy-Discussion mailing list
>>>>> NumPy-Discussion at python.org
>>>>> https://mail.python.org/mailman/listinfo/numpy-discussion
>>>>>
>>>>>
>>>> _______________________________________________
>>>> NumPy-Discussion mailing list
>>>> NumPy-Discussion at python.org
>>>> https://mail.python.org/mailman/listinfo/numpy-discussion
>>>>
>>>
>>> _______________________________________________
>>> NumPy-Discussion mailing list
>>> NumPy-Discussion at python.org
>>> https://mail.python.org/mailman/listinfo/numpy-discussion
>>>
>>>
>> _______________________________________________
>> NumPy-Discussion mailing list
>> NumPy-Discussion at python.org
>> https://mail.python.org/mailman/listinfo/numpy-discussion
>>
>
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at python.org
> https://mail.python.org/mailman/listinfo/numpy-discussion
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20170511/42ae8991/attachment-0001.html>


More information about the NumPy-Discussion mailing list