Skip to content

Commit

Permalink
Style fixes and exceptions
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Eykholt <kheykholt@gmail.com>
  • Loading branch information
keykholt committed Nov 9, 2021
1 parent a96b4a6 commit b9bc8a1
Show file tree
Hide file tree
Showing 2 changed files with 727 additions and 837 deletions.
4 changes: 3 additions & 1 deletion art/estimators/classification/deep_partition_ensemble.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,12 @@ def __init__(
)

if hash_function is None:

def hash_function(x):
return int(np.sum(x)) % ensemble_size

if not isinstance(hash_function, Callable):
raise ValueError("hash_function must be callable")

self.hash_function = hash_function
self.ensemble_size = ensemble_size

Expand Down
Loading

0 comments on commit b9bc8a1

Please sign in to comment.