def normalization(data, dmin=0, dmax=1, save_centering=False):
	"""
	Normalization in [a, b] interval or with saving centering
	x` = (b - a) * (xi - min(x)) / (max(x) - min(x)) + a
	Args:
		data (np.ndarray): data for normalization
		dmin (float): left interval
		dmax (float): right interval
		save_centering (bool): if True -- will save data centering and just normalize by lowest data
	Returns:
		np.ndarray: normalized data
	"""
	# checking on errors
	if dmin >= dmax:
		raise Exception("Left interval 'dmin' must be fewer than right interval 'dmax'")
	if save_centering:
		return data / abs(min(data))
	else:
		min_x = min(data)
		max_x = max(data)
		return (data - min_x) * (dmax - dmin) / (max_x - min_x) + dmin