zero_runs

scml.scml2019.zero_runs(a)[source]

Finds all runs of zero in an array

Parameters

a (array) – Input array (assumed to be 1D)

Returns

A 2D array giving beginning and end (exclusive) of zero stretches in the input array.

Return type

np.array