[Numpy-discussion] Re: possible bug in concatenating character arrays

Faheem Mitha faheem at email.unc.edu
Sat Sep 4 20:44:20 CDT 2004


On Sun, 5 Sep 2004 01:45:42 +0000 (UTC), Faheem Mitha
<faheem at email.unc.edu> wrote:

> The following recipe gives a segmentation fault.
>
> ************************************************************************
> In [1]: import numarray.strings as numstr
>
> In [2]: foo = numstr.array("acgttatcgt", shape=(3,3))
>
> In [3]: foo[0] + foo[1]
> Segmentation fault
> *************************************************************************

Another thing that works is:

In [4]: import copy

In [5]: copy.copy(foo[0]) + copy.copy(foo[1])
Out[5]: CharArray(['at', 'ct', 'ga'])

                                                                  Faheem.





More information about the Numpy-discussion mailing list