28 Apr
2003
28 Apr
'03
9:01 a.m.
INTRO: I am trying to use Jnumeric(jython numeric)for mixed arrays of int, NONE, string, and user defined objects, mostly because of the easy to use syntax and notation. QUESTION: Is there an easy way to generate a mask array from object type ? pseudocode: vector = array(['a',2,'b',None,None,None,'hello'])
['a',2,'b',None,None,None,'hello'] mask = equal(vector, isString) [1,0,1,0,0,0,1]
EXAMPLE: vector = array([1,2,3,None,None,None,7])
[1,2,3,None,None,None,7] mask = equal(vector, None).astype(Int8) [0,0,0,1,1,1,0]
PS: Why don't we have a boolean-(0,1)-1bit type ? Chris Fenton