Skip to content

Commit

Permalink
Fix linting errors and CI versions not matching
Browse files Browse the repository at this point in the history
  • Loading branch information
tupui committed Sep 28, 2020
1 parent bebab29 commit 2cde042
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ matrix:
# installed from their CI wheels in a virtualenv with the Python
# interpreter provided by travis.
- name: "Python 3.6 - scikit 0.20.4"
python: "3.7"
env: DISTRIB="conda" PYTHON_VERSION="3.5"
python: "3.6"
env: DISTRIB="conda" PYTHON_VERSION="3.6"
NUMPY_VERSION="1.13.3" SCIPY_VERSION="0.19.1" PYAML_VERSION="16.9.0"
SCIKIT_LEARN_VERSION="0.20.4" MATPLOTLIB_VERSION="2.0.0" COVERAGE="false"
JOBLIB_VERSION="0.11"
- name: "Python 3.6 - scikit 0.21.3"
python: "3.7"
python: "3.6"
env: DISTRIB="conda" PYTHON_VERSION="3.6"
NUMPY_VERSION="1.14.0" SCIPY_VERSION="1.0.0" PYAML_VERSION="16.12.0"
SCIKIT_LEARN_VERSION="0.21.3" MATPLOTLIB_VERSION="2.0.0" COVERAGE="false"
Expand All @@ -38,7 +38,7 @@ matrix:
SCIKIT_LEARN_VERSION="0.22.1" MATPLOTLIB_VERSION="*" COVERAGE="true"
JOBLIB_VERSION="0.13"
- name: "Python 3.8 - scikit 0.23.2"
python: "3.7"
python: "3.8"
env: DISTRIB="conda" PYTHON_VERSION="3.8.1" COVERAGE="false"
NUMPY_VERSION="1.19.1" SCIPY_VERSION="1.5.2" PYAML_VERSION="20.4.0"
SCIKIT_LEARN_VERSION="0.23.2" JOBLIB_VERSION="0.16.0"
Expand Down
11 changes: 6 additions & 5 deletions skopt/sampler/sobol.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import warnings

import numpy as np
from scipy.stats import norm
from .base import InitialPointGenerator
from ..space import Space
from sklearn.utils import check_random_state
Expand Down Expand Up @@ -167,9 +166,10 @@ def init(self, dim_num):
# Check parameters.
if dim_num < 1 or self.dim_max < dim_num:
raise ValueError(f'I4_SOBOL - Fatal error!\n'
f' The spatial dimension DIM_NUM should satisfy:\n'
f' 1 <= DIM_NUM <= {self.dim_max}\n'
f' But this input value is DIM_NUM = {dim_num}')
f' The spatial dimension DIM_NUM should '
f'satisfy:\n'
f' 1 <= DIM_NUM <= {self.dim_max}\n'
f' But this input value is DIM_NUM = {dim_num}')

# Initialize the remaining rows of V.
for i in range(2, dim_num + 1):
Expand Down Expand Up @@ -249,7 +249,8 @@ def generate(self, dimensions, n_samples, random_state=None):
.format(self.num_generated, n_samples,
total_n_samples))
if self.skip != 0 and total_n_samples > self.skip:
raise ValueError(f"{self.skip} points have been skipped: generating "
raise ValueError(f"{self.skip} points have been skipped: "
f"generating "
f"{n_samples} more points would cause the "
f"sequence to repeat.")

Expand Down

0 comments on commit 2cde042

Please sign in to comment.