eelbrain.NDVar.sign

NDVar.sign(name=None)

Element-wise indication of the sign

Parameters

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

Returns

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

Return type

NDVar

Notes

Like numpy.sign().