def zero_cross(data, zero=0):
	"""
	Calculate the number of times the data
	crosses the `zero` value.

	Parameters
	----------
	data : ndarray
		Time series of data values.

	zero : scalar, default=0
		Crossing point to analyze.

	Returns
	-------
	cross : float
		Number of times the data crosses `zero`.
	"""
	return (((data[:-1] - zero) * (data[1:] - zero)) < zero).sum()