From ae4ecbd67cc545f01297304d096275a3ea7b0367 Mon Sep 17 00:00:00 2001 From: art Date: Mon, 23 Dec 2019 12:48:13 -0600 Subject: [PATCH] analysis.py v 1.1.11.005 --- data analysis/analysis/analysis.py | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/data analysis/analysis/analysis.py b/data analysis/analysis/analysis.py index 78895973..b7b78ebf 100644 --- a/data analysis/analysis/analysis.py +++ b/data analysis/analysis/analysis.py @@ -7,10 +7,12 @@ # current benchmark of optimization: 1.33 times faster # setup: -__version__ = "1.1.11.004" +__version__ = "1.1.11.005" # changelog should be viewed using print(analysis.__changelog__) __changelog__ = """changelog: + 1.1.11.005: + - added min and max for basic_stats 1.1.11.004: - bug fixes 1.1.11.003: @@ -270,8 +272,10 @@ def basic_stats(data): _median = median(data_t) _stdev = stdev(data_t) _variance = variance(data_t) + _min = npmin(data_t) + _max = npmax() - return _mean, _median, _stdev, _variance + return _mean, _median, _stdev, _variance, _min, _max # returns z score with inputs of point, mean and standard deviation of spread @jit(forceobj=True) @@ -432,6 +436,16 @@ def variance(data): return np.var(data) +@jit(nopython=True) +def npmin(data): + + return np.amin(data) + +@jit(nopython=True) +def npmax(data): + + return np.amax(data) + @jit(forceobj=True) def kmeans(data, n_clusters=8, init="k-means++", n_init=10, max_iter=300, tol=0.0001, precompute_distances="auto", verbose=0, random_state=None, copy_x=True, n_jobs=None, algorithm="auto"):