[SciPy-dev] chararry array method
perry at stsci.edu
Wed Jan 4 12:59:25 CST 2006
On Dec 29, 2005, at 5:00 PM, Travis Oliphant wrote:
> So, this is taking a buffer and chopping it into string bits.
> Currently, the chararray array function does not take a buffer input.
Yes, this is common for us as we usually create these from tables
from files where some columns of the tables contain fixed width strings.
It would be uncommon for the data buffer to contain only strings, but we
generally need to create such arrays from data buffers.
> I would suggest not using character arrays in pyfits just yet. They
> not really necessary, because normal arrays can be of string type. If
> you really need the functionality of the chararray (string methods or
> equality testing), then create it after creating the normal array (no
> data will be copied). I'd like to better understand use cases of
> special string arrays a little better. I'm not sure I completely
> understand why numarray split everything into different array types.
> Much more is supported in the basic array type in scipy.
I suppose this points to the fact that I'm not clear on what different
roles the string array (and unicode) and character arrays play. In
it was thought that eventually that character arrays would support all
string methods (within reason considering the constraints of fixed
that made it different enough from numeric arrays. Is this detailed
I tried finding it in the latest version of the Guide but it seems that
topic of string arrays isn't discussed a lot. So a brief outline of how
you see this working might help (e.g., should we really be working on
enhancing the string array instead of focusing on character arrays?)
More information about the Scipy-dev