Base.proportionZero

Base.proportionZero()

Returns a number representing the proportion of values that are equal to zero in the nimble object.

Examples

>>> lst = [[1, 2, 0], [0, 0, 5]]
>>> X = nimble.data(lst)
>>> X.proportionZero()
0.5