Utilities/maths/math_utils.py
def fill_nans_interpolate(y, pkind='linear'):
	"""
	Interpolates data to fill nan values

	Parameters:
		y : nd array 
			source data with np.NaN values

	Returns:
		nd array 
			resulting data with interpolated values instead of nans
	"""
	aindexes = np.arange(y.shape[0])
	agood_indexes, = np.where(np.isfinite(y))
	f = interp1d(agood_indexes
			, y[agood_indexes]
			, bounds_error=False
			, copy=False
			, fill_value="extrapolate"
			, kind=pkind)
	return f(aindexes)

	Interpolates data to fill nan values

	Parameters:
		y : nd array 
			source data with np.NaN values

	Returns:
		nd array 
			resulting data with interpolated values instead of nans
	
Interpolates data to fill nan values
Interpolates data to fill nan values
def fill_nans_interpolate(y, pkind='linear'):
	aindexes = np.arange(y.shape[0])
	agood_indexes, = np.where(np.isfinite(y))
	f = interp1d(agood_indexes
			, y[agood_indexes]
			, bounds_error=False
			, copy=False
			, fill_value="extrapolate"
			, kind=pkind)
	return f(aindexes)
def fill_nans_interpolate ( y , pkind = 'linear' ) : aindexes = np . arange ( y . shape [ 0 ] ) agood_indexes , = np . where ( np . isfinite ( y ) ) f = interp1d ( agood_indexes , y [ agood_indexes ] , bounds_error = False , copy = False , fill_value = "extrapolate" , kind = pkind ) return f ( aindexes )
Interpolates data to fill nan values
Interpolates data to fill nan values
"""
	Interpolates data to fill nan values

	Parameters:
		y : nd array 
			source data with np.NaN values

	Returns:
		nd array 
			resulting data with interpolated values instead of nans
	"""
nd array
resulting data with interpolated values instead of nans
nd array resulting data with interpolated values instead of nans
y
pkind
y 
nd array
source data with np.NaN values
nd array source data with np . NaN values