I have filed a bug against this, along with a patch that fixes casting
to fixed-size string arrays:
http://projects.scipy.org/numpy/ticket/1235
Undefined-sized string arrays is a harder problem, which I'm deferring
for later.
Mike
On 09/24/2009 01:19 PM, Michael Droettboom wrote:
> On 09/24/2
On 09/24/2009 01:02 PM, Christopher Barker wrote:
> Michael Droettboom wrote:
>
>> As I'm looking into fixing a number of bugs in chararray, I'm running
>> into some surprising behavior.
>> In [14]: x = np.array(['abcdefgh', 'ijklmnop'], 'O')
>>
>> # Without specifying the length, it seems to d
Michael Droettboom wrote:
> As I'm looking into fixing a number of bugs in chararray, I'm running
> into some surprising behavior.
> In [14]: x = np.array(['abcdefgh', 'ijklmnop'], 'O')
>
> # Without specifying the length, it seems to default to sizeof(int)... ???
> In [15]: np.array(x, 'S')
> Ou
As I'm looking into fixing a number of bugs in chararray, I'm running
into some surprising behavior. One of the things chararray needs to do
occasionally is build up an object array of string objects, and then
convert that back to a fixed-length string array. This length is
sometimes predeter