From: Todd M. <jm...@st...> - 2002-04-25 14:52:29
|
Magnus Lie Hetland wrote: >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 > Check out chararray for character arrays. Check out recarray for arrays of fixed length structs. To make your own non-numeric arrays, subclass NDArray. > >even supported? My version might not be themost recent...) > >And what about subclasses of numeric types? > >E.g: > ># numarray > >>>>class foo(int): pass >>>>a = array(map(foo, xrange(10))) >>>> >[...] >TypeError: Expecting a python numeric type, got a foo > ># Numeric > >>>>class foo(int): pass >>>>a = array(map(foo, xrange(10))) >>>>tupe(a[0]) >>>> ><type 'int'> > >Neither behaviour seems very helpful -- I guess numarray's is >cleaner... (Although in this case I think an object array could have >been nice...) > Object arrays fall into the *eventually* category: planned but not imminent. > > >-- >Magnus Lie Hetland The Anygui Project >http://hetland.org http://anygui.org > >_______________________________________________ >Numpy-discussion mailing list >Num...@li... >https://lists.sourceforge.net/lists/listinfo/numpy-discussion > Todd -- Todd Miller jm...@st... STSCI / SSG (410) 338 4576 |