|
RE: possible bug in concatenating character arrays: msg#00013python.numeric.general
I dont get this result with numarray 1.1 (from CVS) with python versions 2.3.4 and 2.4.a2: >>> import numarray.strings as numstr >>> foo = numstr.array("acgttatcgt", shape=(3,3)) >>> foo[0] + foo[1] CharArray(['at', 'ct', 'ga']) Nadav. -----Original Message----- From: Faheem Mitha [mailto:faheem@xxxxxxxxxxxxx] Sent: Sun 05-Sep-04 04:45 To: numpy-discussion@xxxxxxxxxxxxxxxxxxxxx Cc: Subject: [Numpy-discussion] possible bug in concatenating character arrays 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 ************************************************************************* It works if instead one does: ************************************************************************* In [4]: a = foo[0] In [5]: b = foo[1] In [6]: a Out[6]: CharArray(['a', 'c', 'g']) In [7]: b Out[7]: CharArray(['t', 't', 'a']) In [8]: a + b Out[8]: CharArray(['at', 'ct', 'ga']) *************************************************************************** In the case of numerical arrays, either method works. In [9]: bar = numarray.array(range(9), shape=(3,3)) In [10]: bar Out[10]: array([[0, 1, 2], [3, 4, 5], [6, 7, 8]]) In [11]: a = bar[0] In [12]: b = bar[1] In [13]: a + b Out[13]: array([3, 5, 7]) In [14]: bar[0] + bar[1] Out[14]: array([3, 5, 7]) ************************************************************ If this is a bug (I'd appreciate confirmation of this), should I report to the bug tracking system? Please cc me, I'm not subscribed. Faheem. ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click _______________________________________________ Numpy-discussion mailing list Numpy-discussion@xxxxxxxxxxxxxxxxxxxxx https://lists.sourceforge.net/lists/listinfo/numpy-discussion ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_idP47&alloc_id808&op=click |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: possible bug in concatenating character arrays: 00013, Faheem Mitha |
|---|---|
| Next by Date: | RE: possible bug in concatenating character arrays: 00013, Nadav Horesh |
| Previous by Thread: | Re: possible bug in concatenating character arraysi: 00013, Faheem Mitha |
| Next by Thread: | RE: possible bug in concatenating character arrays: 00013, Nadav Horesh |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |