From 06e651201167ac00511bf8d795829bee6e0854fc Mon Sep 17 00:00:00 2001 From: Adam Li Date: Mon, 10 Jun 2024 10:43:15 -0400 Subject: [PATCH] Fix cython main Signed-off-by: Adam Li --- sklearn/tree/_tree.pyx | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/sklearn/tree/_tree.pyx b/sklearn/tree/_tree.pyx index 712e352b000ab..374cd2e29df79 100644 --- a/sklearn/tree/_tree.pyx +++ b/sklearn/tree/_tree.pyx @@ -22,6 +22,7 @@ from libc.math cimport isnan from libcpp.vector cimport vector from libcpp.algorithm cimport pop_heap from libcpp.algorithm cimport push_heap +from libcpp.stack cimport stack from libcpp cimport bool import struct @@ -43,15 +44,6 @@ cdef extern from "numpy/arrayobject.h": void* data, int flags, object obj) int PyArray_SetBaseObject(cnp.ndarray arr, PyObject* obj) -cdef extern from "" namespace "std" nogil: - cdef cppclass stack[T]: - ctypedef T value_type - stack() except + - bint empty() - void pop() - void push(T&) except + # Raise c++ exception for bad_alloc -> MemoryError - T& top() - # ============================================================================= # Types and constants # =============================================================================