![](https://secure.gravatar.com/avatar/86776c6c595af5117de5ba7b41bc33b5.jpg?s=120&d=mm&r=g)
I can't find this in the docs (although I've heard it's mentioned there)... Is support for non-numeric arrays (such as character arrays or object pointer arrays) as in Numeric planned for numarray? (Perhaps even supported? My version might not be themost recent...) And what about subclasses of numeric types? E.g: # numarray
# Numeric
Neither behaviour seems very helpful -- I guess numarray's is cleaner... (Although in this case I think an object array could have been nice...) -- Magnus Lie Hetland The Anygui Project http://hetland.org http://anygui.org
![](https://secure.gravatar.com/avatar/faf9400121dca9940496a7473b1d8179.jpg?s=120&d=mm&r=g)
Magnus Lie Hetland wrote:
Check out chararray for character arrays. Check out recarray for arrays of fixed length structs. To make your own non-numeric arrays, subclass NDArray.
Object arrays fall into the *eventually* category: planned but not imminent.
Todd -- Todd Miller jmiller@stsci.edu STSCI / SSG (410) 338 4576
![](https://secure.gravatar.com/avatar/86776c6c595af5117de5ba7b41bc33b5.jpg?s=120&d=mm&r=g)
Magnus Lie Hetland <magnus@hetland.org>: [snip] Just a quick explanation for why I'm interested in this... I've got a two-dimensional array of ints (or bytes, actually), that I would like to convert to a delimited string (e.g. comma-separated). This works in Numeric:
-- Magnus Lie Hetland The Anygui Project http://hetland.org http://anygui.org
![](https://secure.gravatar.com/avatar/c7976f03fcae7e1199d28d1c20e34647.jpg?s=120&d=mm&r=g)
[I see Todd has already answered this, the following might add a little more detail]
Yes, in fact there is a character array class included with numarray (but not documented, I believe. For the moment, you'll have to deal with the source. We developed it for use with our I/O library but it seemed to be of general enough use to include with numarray. We also plan to support arrays of Python objects. There are various ways that this could be done and we ought to discuss how it should be done (perhaps multiple ways). But the underlying machinery certainly will support it.
We haven't had much time to think about how we deal with numeric subclasses. Certainly one would not use these for efficiency, I can't see any simple way of making such things go fast. But it may be possible to have such things work with numarray ufuncs and other numeric operations in some automatic way. I'd have to think about that. It's not high on the priority list at the moment. (Speaking of which I may post in a few days). Thanks, Perry
![](https://secure.gravatar.com/avatar/faf9400121dca9940496a7473b1d8179.jpg?s=120&d=mm&r=g)
Magnus Lie Hetland wrote:
Check out chararray for character arrays. Check out recarray for arrays of fixed length structs. To make your own non-numeric arrays, subclass NDArray.
Object arrays fall into the *eventually* category: planned but not imminent.
Todd -- Todd Miller jmiller@stsci.edu STSCI / SSG (410) 338 4576
![](https://secure.gravatar.com/avatar/86776c6c595af5117de5ba7b41bc33b5.jpg?s=120&d=mm&r=g)
Magnus Lie Hetland <magnus@hetland.org>: [snip] Just a quick explanation for why I'm interested in this... I've got a two-dimensional array of ints (or bytes, actually), that I would like to convert to a delimited string (e.g. comma-separated). This works in Numeric:
-- Magnus Lie Hetland The Anygui Project http://hetland.org http://anygui.org
![](https://secure.gravatar.com/avatar/c7976f03fcae7e1199d28d1c20e34647.jpg?s=120&d=mm&r=g)
[I see Todd has already answered this, the following might add a little more detail]
Yes, in fact there is a character array class included with numarray (but not documented, I believe. For the moment, you'll have to deal with the source. We developed it for use with our I/O library but it seemed to be of general enough use to include with numarray. We also plan to support arrays of Python objects. There are various ways that this could be done and we ought to discuss how it should be done (perhaps multiple ways). But the underlying machinery certainly will support it.
We haven't had much time to think about how we deal with numeric subclasses. Certainly one would not use these for efficiency, I can't see any simple way of making such things go fast. But it may be possible to have such things work with numarray ufuncs and other numeric operations in some automatic way. I'd have to think about that. It's not high on the priority list at the moment. (Speaking of which I may post in a few days). Thanks, Perry
participants (3)
-
Magnus Lie Hetland
-
Perry Greenfield
-
Todd Miller