![](https://secure.gravatar.com/avatar/6839c9c2818b118bfbea052a50c7c0d0.jpg?s=120&d=mm&r=g)
April 27, 2003
11:31 p.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
7964
Age (days ago)
7964
Last active (days ago)
0 comments
1 participants
participants (1)
-
Chris Fenton