Skip to content

Commit

Permalink
fix FIGS numpy scalar extraction warning
Browse files Browse the repository at this point in the history
  • Loading branch information
csinva committed Aug 22, 2023
1 parent 86645d0 commit e94d115
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions docs/tree/figs.html
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@

def _predict_tree_single_point(root: Node, x):
if root.left is None and root.right is None:
return root.value
return root.value[0, 0]
left = x[root.feature] <= root.threshold
if left:
if root.left is None: # we don't actually have to worry about this case
Expand Down Expand Up @@ -1116,7 +1116,7 @@ <h2 id="params">Params</h2>

def _predict_tree_single_point(root: Node, x):
if root.left is None and root.right is None:
return root.value
return root.value[0, 0]
left = x[root.feature] &lt;= root.threshold
if left:
if root.left is None: # we don&#39;t actually have to worry about this case
Expand Down
2 changes: 1 addition & 1 deletion imodels/tree/figs.py
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ def _predict_tree(self, root: Node, X):

def _predict_tree_single_point(root: Node, x):
if root.left is None and root.right is None:
return root.value
return root.value[0, 0]
left = x[root.feature] <= root.threshold
if left:
if root.left is None: # we don't actually have to worry about this case
Expand Down

0 comments on commit e94d115

Please sign in to comment.