pyarrow.compute.sign#

pyarrow.compute.sign(x, /, *, memory_pool=None)#

Get the signedness of the arguments element-wise.

Output is any of (-1,1) for nonzero inputs and 0 for zero input. NaN values return NaN. Integral values return signedness as Int8 and floating-point values return it with the same type as the input values.

Parameters:
xArray-like or scalar-like

Argument to compute function.

memory_poolpyarrow.MemoryPool, optional

If not passed, will allocate memory from the default memory pool.