eelbrain.NDVar.sign

NDVar.sign(self, name=None)

Element-wise indication of the sign

Parameters:
name : str

Name of the output NDVar (default is the current name).

Returns:
sign : NDVar

NDVar of same shape, -1 if x < 0, 0 if x==0, 1 if x > 0.

Notes

Like numpy.sign().