def peaksNegPos(data):
	"""
	Peaks: the number of positive peaks in the data window per unit time.
	
	Parameters
	----------
		data: array-like
			2D matrix of shape (time, data)
		
	Returns
	-------
		peaksNegPosData: 1D numpy array containing total number of peaks in given 
				 signal
	"""
	
	sign = lambda z: (1, -1)[z < 0]
		
	i = [sign(z) for z in (data[2:]-data[1:-1])]
	j = [sign(z) for z in (data[1:-1]-data[:-2])]
	k = [a_i - b_i for a_i, b_i in zip(j, i)]
	
	peaksNegPosData = [max([0,z]) for z in k]
	peaksNegPosData = sum(peaksNegPosData)/(len(data)-2)
	
	return peaksNegPosData