reduced random blank lines

This commit is contained in:
ltcptgeneral 2019-09-30 16:09:31 -05:00
parent bf1218fdfd
commit 71a0227f8a

View File

@ -201,6 +201,7 @@ def basic_stats(data):
@jit(forceobj=True) @jit(forceobj=True)
def z_score(point, mean, stdev): def z_score(point, mean, stdev):
score = (point - mean) / stdev score = (point - mean) / stdev
return score return score
# expects 2d array, normalizes across all axes # expects 2d array, normalizes across all axes
@ -208,9 +209,7 @@ def z_score(point, mean, stdev):
def z_normalize(array, *args): def z_normalize(array, *args):
array = np.array(array) array = np.array(array)
for arg in args: for arg in args:
array = preprocessing.normalize(array, axis = arg) array = preprocessing.normalize(array, axis = arg)
return array return array
@ -220,13 +219,9 @@ def z_normalize(array, *args):
def histo_analysis(hist_data): def histo_analysis(hist_data):
hist_data = np.array(hist_data) hist_data = np.array(hist_data)
derivative = np.array(len(hist_data) - 1, dtype = float) derivative = np.array(len(hist_data) - 1, dtype = float)
t = np.diff(hist_data) t = np.diff(hist_data)
derivative = t[1] / t[0] derivative = t[1] / t[0]
np.sort(derivative) np.sort(derivative)
return basic_stats(derivative)[0], basic_stats(derivative)[3] return basic_stats(derivative)[0], basic_stats(derivative)[3]