Skip to content

Commit

Permalink
Change cnp.float64 to float64_t
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Li <adam2392@gmail.com>
  • Loading branch information
adam2392 committed Oct 17, 2023
1 parent 60287ae commit 09f7785
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion sklearn/tree/_tree.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ cdef class BaseTree:
) noexcept nogil
cdef void _compute_feature_importances(
self,
cnp.float64_t[:] importances,
float64_t[:] importances,
Node* node,
) noexcept nogil

Expand Down
4 changes: 2 additions & 2 deletions sklearn/tree/_tree.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -1506,7 +1506,7 @@ cdef class BaseTree:
cdef float64_t normalizer = 0.
cdef intp_t i = 0

cdef cnp.float64_t[:] importances = np.zeros(self.n_features)
cdef float64_t[:] importances = np.zeros(self.n_features)

with nogil:
while node != end_node:
Expand All @@ -1532,7 +1532,7 @@ cdef class BaseTree:

cdef void _compute_feature_importances(
self,
cnp.float64_t[:] importances,
float64_t[:] importances,
Node* node
) noexcept nogil:
"""Compute feature importances from a Node in the Tree.
Expand Down

0 comments on commit 09f7785

Please sign in to comment.