Var.convert_value()

Var.convert_value()#

static Var.convert_value(x)[source]#

The function used to process the value of this variable, if convert="default" is supplied during init.

Can be overwritten on subclasses to create variable classes with different default conversion behavior. Make sure to overwrite it with a static method, for example (re-implementing the default behavior):

class MyVar(lsl.Var):
    @staticmethod
    def convert_value(x):
        return jnp.asarray(x)
Return type:

Any