Skip to content

Commit

Permalink
Backport Python 3.4
Browse files Browse the repository at this point in the history
  • Loading branch information
yzhao062 authored and yuezhao@cs.toronto.edu committed Jun 1, 2018
1 parent d3b7aa9 commit 582dbae
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
5 changes: 2 additions & 3 deletions .travis.yml
@@ -1,9 +1,8 @@
language: python
python:
# - "2.6"
# - "2.7"
# - "3.3"
# - "3.4"
# - "3.3" # failed due to setuptool version
- "3.4"
- "3.5"
- "3.5-dev" # 3.5 development branch
- "3.6"
Expand Down
5 changes: 3 additions & 2 deletions pyod/models/hbos.py
Expand Up @@ -7,6 +7,7 @@
from sklearn.utils import check_array
from sklearn.utils.validation import check_is_fitted
from sklearn.utils.multiclass import check_classification_targets
from sklearn.utils.testing import assert_allclose

from .base import BaseDetector

Expand Down Expand Up @@ -44,8 +45,8 @@ def fit(self, X, y=None):
bins=self.bins,
density=True)
# check the integrity
assert (
math.isclose(np.sum(hist[:, i] * np.diff(bin_edges[:, i])), 1))
assert_allclose(1, np.sum(hist[:, i] * np.diff(bin_edges[:, i])),
atol=0.1)

# calculate the threshold_
for i in range(dim_train):
Expand Down

0 comments on commit 582dbae

Please sign in to comment.