SciPy

scipy.stats.mstats.msign

scipy.stats.mstats.msign(x)[source]

Returns the sign of x, or 0 if x is masked.