예제 #1
0
 def in_values(self, other):
     '''
     Return the array with the value of 1 when the element value
     in the list other, otherwise set value as 0.
     
     :param other: (*list or array*) List value.
     
     :returns: (*array*) Result array.
     '''
     if not isinstance(other, (list, tuple)):
         other = other.aslist()
     r = MIArray(ArrayMath.inValues(self.array, other))
     return r
예제 #2
0
 def in_values(self, other):
     '''
     Return the array with the value of 1 when the element value
     in the list other, otherwise set value as 0.
     
     :param other: (*list or array*) List value.
     
     :returns: (*array*) Result array.
     '''
     if not isinstance(other, (list, tuple)):
         other = other.aslist()
     r = MIArray(ArrayMath.inValues(self.array, other))
     return r