andes.core.service.FlagValue#

class andes.core.service.FlagValue(u, value, flag=0, name=None, tex_name=None, info=None, cache=True)[source]#

Class for flagging values that equal to the given value.

By default, values that equal to value will be flagged as 0. Non-matching values will be flagged as 1.

Parameters:
u

Input parameter

value

Value to flag. Can be None, string, or a number.

flag0 by default, only 0 or 1 is accepted.

The flag for the matched ones

Warning

FlagNotNone can only be applied to BaseParam with cache=True. Applying to Service will fail unless cache is False (at a performance cost).

__init__(u, value, flag=0, name=None, tex_name=None, info=None, cache=True)[source]#

Methods

assign_memory(n)

Assign memory for self.v and set the array to zero.

get_names()

Return name in a list

Attributes

class_name

Return the class name

n

Return the count of values in self.v.

v