(arr, clip=True)
return scaled
Trim NumPy array values to be in [0, 255] range with option of
	clipping or scaling.

	Parameters:
	-------
	arr: array to be trimmed to [0, 255] range
	clip: should array be scaled by np.clip? if False then input
		array will be min-max scaled to range
		[max([arr.min(), 0]), min([arr.max(), 255])]

	Returns:
	-------
	NumPy array that has been scaled to be in [0, 255] range
Trim NumPy array values to be in [0, 255] range with option of
	clipping or scaling.
Trim NumPy array values to be in [ 0 255 ] range with option of clipping or scaling .
def _scale_array(arr, clip=True):
	"""
	Trim NumPy array values to be in [0, 255] range with option of
	clipping or scaling.

	Parameters:
	-------
	arr: array to be trimmed to [0, 255] range
	clip: should array be scaled by np.clip? if False then input
		array will be min-max scaled to range
		[max([arr.min(), 0]), min([arr.max(), 255])]

	Returns:
	-------
	NumPy array that has been scaled to be in [0, 255] range
	"""
	if clip:
		scaled = np.clip(arr, 0, 255)
	else:
		scale_range = (max([arr.min(), 0]), min([arr.max(), 255]))
		scaled = _min_max_scale(arr, new_range=scale_range)

	return scaled
def _scale_array ( arr , clip = True ) : if clip : scaled = np . clip ( arr , 0 , 255 ) else : scale_range = ( max ( [ arr . min ( ) , 0 ] ) , min ( [ arr . max ( ) , 255 ] ) ) scaled = _min_max_scale ( arr , new_range = scale_range ) return scaled