From 5ec699e6a2303ce2380e971c577607ffc4638d37 Mon Sep 17 00:00:00 2001 From: jordanrhall Date: Mon, 18 Nov 2019 15:44:58 -0700 Subject: [PATCH 1/3] cast sample sizes as integers without warning --- active_subspaces/subspaces.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/active_subspaces/subspaces.py b/active_subspaces/subspaces.py index 95642c8..667b2e8 100644 --- a/active_subspaces/subspaces.py +++ b/active_subspaces/subspaces.py @@ -170,10 +170,8 @@ def partition(self, n): the dimension of the active subspace """ - if not isinstance(n, int): - #raise TypeError('n should be an integer') - n = int(n) - print(Warning("n should be an integer. Performing conversion.")) + # Cast n as an integer. + n = int(n) m = self.eigenvecs.shape[0] if n<1 or n>m: From 81522622d4dde7753498de9de0d25be638c32d8f Mon Sep 17 00:00:00 2001 From: jordanrhall Date: Mon, 18 Nov 2019 16:34:37 -0700 Subject: [PATCH 2/3] version-locked scipy --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index a95dd45..5dcdf1a 100644 --- a/setup.py +++ b/setup.py @@ -23,7 +23,7 @@ def readme(): packages=['active_subspaces', 'active_subspaces.utils'], install_requires=[ 'numpy', - 'scipy >= 0.15.0', + 'scipy >= 0.15.0,<=1.2.2', 'matplotlib' ], test_suite='nose.collector', From e2e194bb2f7359f1b2590a3d86f358174d989597 Mon Sep 17 00:00:00 2001 From: jordanrhall Date: Mon, 18 Nov 2019 16:48:32 -0700 Subject: [PATCH 3/3] use pip install instead of setup.py --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index bfbd0c2..f88a1a3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,6 +27,6 @@ install: - source activate test - conda install --yes numpy scipy matplotlib pip nose - pip install setuptools - - python setup.py install + - pip install . script: python test.py