Skip to content
Snippets Groups Projects
Commit 6f54142b authored by Matt Wala's avatar Matt Wala
Browse files

Fix error message; allow negative refine weights.

parent a80d70a5
No related branches found
No related tags found
No related merge requests found
......@@ -269,9 +269,10 @@ class TreeBuilder(object):
% refine_weight_dtype)
if max_leaf_refine_weight < cl.array.max(refine_weights).get():
raise ValueError("woops")
if max_leaf_refine_weight <= 0:
raise ValueError("max_leaf_refine_weight must be positive")
raise ValueError(
"entries of refine_weights cannot exceed max_leaf_refine_weight")
if max_leaf_refine_weight < 0:
raise ValueError("max_leaf_refine_weight must be nonnegative")
total_refine_weight = cl.array.sum(refine_weights).get()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment