From 0e22b0712f288aafc0b70d8e8e55088f3b838b2b Mon Sep 17 00:00:00 2001 From: monocongo Date: Wed, 31 Oct 2018 12:09:56 -0400 Subject: [PATCH 1/4] removed version settings on numpy and scipy #3 --- conda-recipe/meta.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/conda-recipe/meta.yaml b/conda-recipe/meta.yaml index 6790997..3ca60fc 100644 --- a/conda-recipe/meta.yaml +++ b/conda-recipe/meta.yaml @@ -12,13 +12,13 @@ requirements: build: - python - setuptools - - numpy 1.9* - - scipy >=0.14 + - numpy + - scipy run: - python - - numpy 1.9* - - scipy >=0.14 + - numpy + - scipy test: imports: From 2a31168fe42af74ff51ed5950fd5377998940efe Mon Sep 17 00:00:00 2001 From: monocongo Date: Wed, 31 Oct 2018 12:35:01 -0400 Subject: [PATCH 2/4] removed readme from the about section since this was causing a files/info exception from conda-build #3 --- conda-recipe/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conda-recipe/meta.yaml b/conda-recipe/meta.yaml index 3ca60fc..7792444 100644 --- a/conda-recipe/meta.yaml +++ b/conda-recipe/meta.yaml @@ -29,5 +29,5 @@ about: license: GPLv3 license_file: LICENSE summary: Python library for estimating linear moments for statistical distributions - readme: README.rst +# readme: README.rst From fcbc2e9a699eb6a1403df49914d242629c388e58 Mon Sep 17 00:00:00 2001 From: monocongo Date: Wed, 31 Oct 2018 12:45:01 -0400 Subject: [PATCH 3/4] removed commented line #3 --- conda-recipe/meta.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/conda-recipe/meta.yaml b/conda-recipe/meta.yaml index 7792444..8f7b290 100644 --- a/conda-recipe/meta.yaml +++ b/conda-recipe/meta.yaml @@ -29,5 +29,4 @@ about: license: GPLv3 license_file: LICENSE summary: Python library for estimating linear moments for statistical distributions -# readme: README.rst From 3349b90463f649aea02be5dc3726d22e5e500dc3 Mon Sep 17 00:00:00 2001 From: James Adams Date: Sun, 2 Jun 2019 12:55:08 -0400 Subject: [PATCH 4/4] replaced scipy.misc.comb with scipy.special.comb --- lmoments3/__init__.py | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/lmoments3/__init__.py b/lmoments3/__init__.py index 99441f4..a09f3b8 100644 --- a/lmoments3/__init__.py +++ b/lmoments3/__init__.py @@ -62,7 +62,7 @@ __version__ = get_versions()['version'] del get_versions -import scipy.misc as sm +import scipy.special import numpy as np @@ -99,7 +99,7 @@ def _samlmularge(x, nmom=5): raise ValueError("Insufficient length of data for specified nmoments") ##Calculate first order - l = [np.sum(x) / sm.comb(n, 1, exact=True)] + l = [np.sum(x) / scipy.special.comb(n, 1, exact=True)] if nmom == 1: return l[0] @@ -109,10 +109,10 @@ def _samlmularge(x, nmom=5): for i in range(1, nmom): comb.append([]) for j in range(n): - comb[-1].append(sm.comb(j, i, exact=True)) + comb[-1].append(scipy.special.comb(j, i, exact=True)) for mom in range(2, nmom + 1): - coefl = 1.0 / mom * 1.0 / sm.comb(n, mom, exact=True) + coefl = 1.0 / mom * 1.0 / scipy.special.comb(n, mom, exact=True) xtrans = [] for i in range(0, n): coeftemp = [] @@ -126,7 +126,7 @@ def _samlmularge(x, nmom=5): coeftemp[j] = coeftemp[j] * comb[j - 1][n - i - 1] for j in range(0, mom): - coeftemp[j] = coeftemp[j] * sm.comb(mom - 1, j, exact=True) + coeftemp[j] = coeftemp[j] * scipy.special.comb(mom - 1, j, exact=True) for j in range(0, int(0.5 * mom)): coeftemp[j * 2 + 1] = -coeftemp[j * 2 + 1] @@ -156,7 +156,7 @@ def _samlmusmall(x, nmom=5): # First L-moment - l1 = np.sum(x) / sm.comb(n, 1, exact=True) + l1 = np.sum(x) / scipy.special.comb(n, 1, exact=True) if nmom == 1: return l1 @@ -164,7 +164,7 @@ def _samlmusmall(x, nmom=5): # Second L-moment comb1 = range(n) - coefl2 = 0.5 / sm.comb(n, 2, exact=True) + coefl2 = 0.5 / scipy.special.comb(n, 2, exact=True) sum_xtrans = sum([(comb1[i] - comb1[n - i - 1]) * x[i] for i in range(n)]) l2 = coefl2 * sum_xtrans @@ -173,8 +173,8 @@ def _samlmusmall(x, nmom=5): # Third L-moment - comb3 = [sm.comb(i, 2, exact=True) for i in range(n)] - coefl3 = 1.0 / 3.0 / sm.comb(n, 3, exact=True) + comb3 = [scipy.special.comb(i, 2, exact=True) for i in range(n)] + coefl3 = 1.0 / 3.0 / scipy.special.comb(n, 3, exact=True) sum_xtrans = sum([(comb3[i] - 2 * comb1[i] * comb1[n - i - 1] + comb3[n - i - 1]) * x[i] for i in range(n)]) l3 = coefl3 * sum_xtrans / l2 @@ -183,8 +183,8 @@ def _samlmusmall(x, nmom=5): # Fourth L-moment - comb5 = [sm.comb(i, 3, exact=True) for i in range(n)] - coefl4 = 0.25 / sm.comb(n, 4, exact=True) + comb5 = [scipy.special.comb(i, 3, exact=True) for i in range(n)] + coefl4 = 0.25 / scipy.special.comb(n, 4, exact=True) sum_xtrans = sum( [(comb5[i] - 3 * comb3[i] * comb1[n - i - 1] + 3 * comb1[i] * comb3[n - i - 1] - comb5[n - i - 1]) * x[i] for i in range(n)]) @@ -195,8 +195,8 @@ def _samlmusmall(x, nmom=5): # Fifth L-moment - comb7 = [sm.comb(i, 4, exact=True) for i in range(n)] - coefl5 = 0.2 / sm.comb(n, 5, exact=True) + comb7 = [scipy.special.comb(i, 4, exact=True) for i in range(n)] + coefl5 = 0.2 / scipy.special.comb(n, 5, exact=True) sum_xtrans = sum( [(comb7[i] - 4 * comb5[i] * comb1[n - i - 1] + 6 * comb3[i] * comb3[n - i - 1] - 4 * comb1[i] * comb5[n - i - 1] + comb7[n - i - 1]) * x[i]