scml.scml2019.helpers

Functions

pos_gauss(mu, sigma)

Returns a sample from a rectified gaussian

_safe_max(a, b)

zero_runs(→ numpy.array)

Finds all runs of zero in an array

Module Contents

scml.scml2019.helpers.pos_gauss(mu, sigma)[source]

Returns a sample from a rectified gaussian

scml.scml2019.helpers._safe_max(a, b)[source]
scml.scml2019.helpers.zero_runs(a: numpy.array) numpy.array[source]

Finds all runs of zero in an array

Parameters:

a – 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