obliquetree 1.0.3__cp310-cp310-win_amd64.whl → 1.0.4__cp310-cp310-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of obliquetree might be problematic. Click here for more details.
- obliquetree/__init__.py +1 -1
- obliquetree/src/base.cp310-win_amd64.pyd +0 -0
- obliquetree/src/base.cpp +371 -331
- obliquetree/src/ccp.cp310-win_amd64.pyd +0 -0
- obliquetree/src/ccp.cpp +109 -74
- obliquetree/src/metric.cp310-win_amd64.pyd +0 -0
- obliquetree/src/metric.cpp +263 -219
- obliquetree/src/oblique.cp310-win_amd64.pyd +0 -0
- obliquetree/src/oblique.cpp +377 -342
- obliquetree/src/tree.cp310-win_amd64.pyd +0 -0
- obliquetree/src/tree.cpp +609 -565
- obliquetree/src/utils.cp310-win_amd64.pyd +0 -0
- obliquetree/src/utils.cpp +160 -120
- {obliquetree-1.0.3.dist-info → obliquetree-1.0.4.dist-info}/METADATA +1 -1
- obliquetree-1.0.4.dist-info/RECORD +21 -0
- obliquetree-1.0.3.dist-info/RECORD +0 -21
- {obliquetree-1.0.3.dist-info → obliquetree-1.0.4.dist-info}/WHEEL +0 -0
- {obliquetree-1.0.3.dist-info → obliquetree-1.0.4.dist-info}/licenses/LICENSE +0 -0
- {obliquetree-1.0.3.dist-info → obliquetree-1.0.4.dist-info}/top_level.txt +0 -0
obliquetree/src/metric.cpp
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* Generated by Cython 3.1.
|
|
1
|
+
/* Generated by Cython 3.1.6 */
|
|
2
2
|
|
|
3
3
|
/* BEGIN: Cython Metadata
|
|
4
4
|
{
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"/std:c++17"
|
|
21
21
|
],
|
|
22
22
|
"include_dirs": [
|
|
23
|
-
"C:\\Users\\runneradmin\\AppData\\Local\\Temp\\build-env-
|
|
23
|
+
"C:\\Users\\runneradmin\\AppData\\Local\\Temp\\build-env-7rx1bwin\\lib\\site-packages\\numpy\\_core\\include"
|
|
24
24
|
],
|
|
25
25
|
"language": "c++",
|
|
26
26
|
"name": "obliquetree.src.metric",
|
|
@@ -36,8 +36,16 @@ END: Cython Metadata */
|
|
|
36
36
|
#define PY_SSIZE_T_CLEAN
|
|
37
37
|
#endif /* PY_SSIZE_T_CLEAN */
|
|
38
38
|
/* InitLimitedAPI */
|
|
39
|
-
#if defined(Py_LIMITED_API)
|
|
39
|
+
#if defined(Py_LIMITED_API)
|
|
40
|
+
#if !defined(CYTHON_LIMITED_API)
|
|
40
41
|
#define CYTHON_LIMITED_API 1
|
|
42
|
+
#endif
|
|
43
|
+
#elif defined(CYTHON_LIMITED_API)
|
|
44
|
+
#ifdef _MSC_VER
|
|
45
|
+
#pragma message ("Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead.")
|
|
46
|
+
#else
|
|
47
|
+
#warning Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead.
|
|
48
|
+
#endif
|
|
41
49
|
#endif
|
|
42
50
|
|
|
43
51
|
#include "Python.h"
|
|
@@ -46,8 +54,8 @@ END: Cython Metadata */
|
|
|
46
54
|
#elif PY_VERSION_HEX < 0x03080000
|
|
47
55
|
#error Cython requires Python 3.8+.
|
|
48
56
|
#else
|
|
49
|
-
#define __PYX_ABI_VERSION "
|
|
50
|
-
#define CYTHON_HEX_VERSION
|
|
57
|
+
#define __PYX_ABI_VERSION "3_1_6"
|
|
58
|
+
#define CYTHON_HEX_VERSION 0x030106F0
|
|
51
59
|
#define CYTHON_FUTURE_DIVISION 1
|
|
52
60
|
/* CModulePreamble */
|
|
53
61
|
#include <stddef.h>
|
|
@@ -410,6 +418,9 @@ END: Cython Metadata */
|
|
|
410
418
|
enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
|
|
411
419
|
#endif
|
|
412
420
|
#endif
|
|
421
|
+
#ifndef CYTHON_LOCK_AND_GIL_DEADLOCK_AVOIDANCE_TIME
|
|
422
|
+
#define CYTHON_LOCK_AND_GIL_DEADLOCK_AVOIDANCE_TIME 100
|
|
423
|
+
#endif
|
|
413
424
|
#ifndef __has_attribute
|
|
414
425
|
#define __has_attribute(x) 0
|
|
415
426
|
#endif
|
|
@@ -1318,6 +1329,7 @@ static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*);
|
|
|
1318
1329
|
typedef sdigit __Pyx_compact_pylong;
|
|
1319
1330
|
typedef digit __Pyx_compact_upylong;
|
|
1320
1331
|
#endif
|
|
1332
|
+
static CYTHON_INLINE int __Pyx_PyLong_CompactAsLong(PyObject *x, long *return_value);
|
|
1321
1333
|
#if PY_VERSION_HEX >= 0x030C00A5
|
|
1322
1334
|
#define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->long_value.ob_digit)
|
|
1323
1335
|
#else
|
|
@@ -2625,22 +2637,22 @@ static int __Pyx__DelItemOnTypeDict(PyTypeObject *tp, PyObject *k);
|
|
|
2625
2637
|
static int __Pyx_setup_reduce(PyObject* type_obj);
|
|
2626
2638
|
|
|
2627
2639
|
/* TypeImport.proto */
|
|
2628
|
-
#ifndef
|
|
2629
|
-
#define
|
|
2640
|
+
#ifndef __PYX_HAVE_RT_ImportType_proto_3_1_6
|
|
2641
|
+
#define __PYX_HAVE_RT_ImportType_proto_3_1_6
|
|
2630
2642
|
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
|
|
2631
2643
|
#include <stdalign.h>
|
|
2632
2644
|
#endif
|
|
2633
2645
|
#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || __cplusplus >= 201103L
|
|
2634
|
-
#define
|
|
2646
|
+
#define __PYX_GET_STRUCT_ALIGNMENT_3_1_6(s) alignof(s)
|
|
2635
2647
|
#else
|
|
2636
|
-
#define
|
|
2648
|
+
#define __PYX_GET_STRUCT_ALIGNMENT_3_1_6(s) sizeof(void*)
|
|
2637
2649
|
#endif
|
|
2638
|
-
enum
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2650
|
+
enum __Pyx_ImportType_CheckSize_3_1_6 {
|
|
2651
|
+
__Pyx_ImportType_CheckSize_Error_3_1_6 = 0,
|
|
2652
|
+
__Pyx_ImportType_CheckSize_Warn_3_1_6 = 1,
|
|
2653
|
+
__Pyx_ImportType_CheckSize_Ignore_3_1_6 = 2
|
|
2642
2654
|
};
|
|
2643
|
-
static PyTypeObject *
|
|
2655
|
+
static PyTypeObject *__Pyx_ImportType_3_1_6(PyObject* module, const char *module_name, const char *class_name, size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_1_6 check_size);
|
|
2644
2656
|
#endif
|
|
2645
2657
|
|
|
2646
2658
|
/* CLineInTraceback.proto */
|
|
@@ -2791,7 +2803,7 @@ static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt
|
|
|
2791
2803
|
static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig);
|
|
2792
2804
|
|
|
2793
2805
|
/* FunctionImport.proto */
|
|
2794
|
-
static int
|
|
2806
|
+
static int __Pyx_ImportFunction_3_1_6(PyObject *module, const char *funcname, void (**f)(void), const char *sig);
|
|
2795
2807
|
|
|
2796
2808
|
/* MultiPhaseInitModuleState.proto */
|
|
2797
2809
|
#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE
|
|
@@ -3445,7 +3457,7 @@ static int __pyx_array___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, P
|
|
|
3445
3457
|
default: goto __pyx_L5_argtuple_error;
|
|
3446
3458
|
}
|
|
3447
3459
|
const Py_ssize_t kwd_pos_args = __pyx_nargs;
|
|
3448
|
-
if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__cinit__", 0) < 0) __PYX_ERR(1, 129, __pyx_L3_error)
|
|
3460
|
+
if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__cinit__", 0) < (0)) __PYX_ERR(1, 129, __pyx_L3_error)
|
|
3449
3461
|
if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_n_u_c));
|
|
3450
3462
|
for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
|
|
3451
3463
|
if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, i); __PYX_ERR(1, 129, __pyx_L3_error) }
|
|
@@ -5059,7 +5071,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
|
5059
5071
|
default: goto __pyx_L5_argtuple_error;
|
|
5060
5072
|
}
|
|
5061
5073
|
const Py_ssize_t kwd_pos_args = __pyx_nargs;
|
|
5062
|
-
if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < 0) __PYX_ERR(1, 3, __pyx_L3_error)
|
|
5074
|
+
if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 3, __pyx_L3_error)
|
|
5063
5075
|
for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
|
|
5064
5076
|
if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 3, __pyx_L3_error) }
|
|
5065
5077
|
}
|
|
@@ -5404,7 +5416,7 @@ static struct __pyx_array_obj *__pyx_array_new(PyObject *__pyx_v_shape, Py_ssize
|
|
|
5404
5416
|
__pyx_t_4 = 0;
|
|
5405
5417
|
__pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 273, __pyx_L1_error)
|
|
5406
5418
|
__Pyx_GOTREF(__pyx_t_4);
|
|
5407
|
-
if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_allocate_buffer, Py_False) < 0) __PYX_ERR(1, 273, __pyx_L1_error)
|
|
5419
|
+
if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_allocate_buffer, Py_False) < (0)) __PYX_ERR(1, 273, __pyx_L1_error)
|
|
5408
5420
|
__pyx_t_3 = ((PyObject *)__pyx_tp_new_array(((PyTypeObject *)__pyx_mstate_global->__pyx_array_type), __pyx_t_1, __pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 273, __pyx_L1_error)
|
|
5409
5421
|
__Pyx_GOTREF((PyObject *)__pyx_t_3);
|
|
5410
5422
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
@@ -5499,7 +5511,7 @@ static int __pyx_MemviewEnum___init__(PyObject *__pyx_v_self, PyObject *__pyx_ar
|
|
|
5499
5511
|
default: goto __pyx_L5_argtuple_error;
|
|
5500
5512
|
}
|
|
5501
5513
|
const Py_ssize_t kwd_pos_args = __pyx_nargs;
|
|
5502
|
-
if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < 0) __PYX_ERR(1, 302, __pyx_L3_error)
|
|
5514
|
+
if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(1, 302, __pyx_L3_error)
|
|
5503
5515
|
for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
|
|
5504
5516
|
if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, i); __PYX_ERR(1, 302, __pyx_L3_error) }
|
|
5505
5517
|
}
|
|
@@ -5936,7 +5948,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
|
5936
5948
|
default: goto __pyx_L5_argtuple_error;
|
|
5937
5949
|
}
|
|
5938
5950
|
const Py_ssize_t kwd_pos_args = __pyx_nargs;
|
|
5939
|
-
if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < 0) __PYX_ERR(1, 16, __pyx_L3_error)
|
|
5951
|
+
if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 16, __pyx_L3_error)
|
|
5940
5952
|
for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
|
|
5941
5953
|
if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 16, __pyx_L3_error) }
|
|
5942
5954
|
}
|
|
@@ -6061,7 +6073,7 @@ static int __pyx_memoryview___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_ar
|
|
|
6061
6073
|
default: goto __pyx_L5_argtuple_error;
|
|
6062
6074
|
}
|
|
6063
6075
|
const Py_ssize_t kwd_pos_args = __pyx_nargs;
|
|
6064
|
-
if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__cinit__", 0) < 0) __PYX_ERR(1, 347, __pyx_L3_error)
|
|
6076
|
+
if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__cinit__", 0) < (0)) __PYX_ERR(1, 347, __pyx_L3_error)
|
|
6065
6077
|
for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
|
|
6066
6078
|
if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, i); __PYX_ERR(1, 347, __pyx_L3_error) }
|
|
6067
6079
|
}
|
|
@@ -10378,7 +10390,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
|
10378
10390
|
default: goto __pyx_L5_argtuple_error;
|
|
10379
10391
|
}
|
|
10380
10392
|
const Py_ssize_t kwd_pos_args = __pyx_nargs;
|
|
10381
|
-
if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < 0) __PYX_ERR(1, 3, __pyx_L3_error)
|
|
10393
|
+
if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 3, __pyx_L3_error)
|
|
10382
10394
|
for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
|
|
10383
10395
|
if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 3, __pyx_L3_error) }
|
|
10384
10396
|
}
|
|
@@ -13265,7 +13277,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
|
13265
13277
|
default: goto __pyx_L5_argtuple_error;
|
|
13266
13278
|
}
|
|
13267
13279
|
const Py_ssize_t kwd_pos_args = __pyx_nargs;
|
|
13268
|
-
if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < 0) __PYX_ERR(1, 3, __pyx_L3_error)
|
|
13280
|
+
if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 3, __pyx_L3_error)
|
|
13269
13281
|
for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
|
|
13270
13282
|
if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 3, __pyx_L3_error) }
|
|
13271
13283
|
}
|
|
@@ -16424,7 +16436,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
|
16424
16436
|
default: goto __pyx_L5_argtuple_error;
|
|
16425
16437
|
}
|
|
16426
16438
|
const Py_ssize_t kwd_pos_args = __pyx_nargs;
|
|
16427
|
-
if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_Enum", 0) < 0) __PYX_ERR(1, 1, __pyx_L3_error)
|
|
16439
|
+
if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_Enum", 0) < (0)) __PYX_ERR(1, 1, __pyx_L3_error)
|
|
16428
16440
|
for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
|
|
16429
16441
|
if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, i); __PYX_ERR(1, 1, __pyx_L3_error) }
|
|
16430
16442
|
}
|
|
@@ -22319,7 +22331,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
22319
22331
|
* for j in range(unique_count):
|
|
22320
22332
|
* if stats[j].class_weights != NULL: # <<<<<<<<<<<<<<
|
|
22321
22333
|
* free(stats[j].class_weights)
|
|
22322
|
-
*
|
|
22334
|
+
* stats[j].class_weights = NULL
|
|
22323
22335
|
*/
|
|
22324
22336
|
__pyx_t_1 = ((__pyx_v_stats[__pyx_v_j]).class_weights != NULL);
|
|
22325
22337
|
if (__pyx_t_1) {
|
|
@@ -22328,24 +22340,33 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
22328
22340
|
* for j in range(unique_count):
|
|
22329
22341
|
* if stats[j].class_weights != NULL:
|
|
22330
22342
|
* free(stats[j].class_weights) # <<<<<<<<<<<<<<
|
|
22343
|
+
* stats[j].class_weights = NULL
|
|
22331
22344
|
* with gil:
|
|
22332
|
-
* raise MemoryError()
|
|
22333
22345
|
*/
|
|
22334
22346
|
free((__pyx_v_stats[__pyx_v_j]).class_weights);
|
|
22335
22347
|
|
|
22348
|
+
/* "obliquetree/src/metric.pyx":904
|
|
22349
|
+
* if stats[j].class_weights != NULL:
|
|
22350
|
+
* free(stats[j].class_weights)
|
|
22351
|
+
* stats[j].class_weights = NULL # <<<<<<<<<<<<<<
|
|
22352
|
+
* with gil:
|
|
22353
|
+
* raise MemoryError()
|
|
22354
|
+
*/
|
|
22355
|
+
(__pyx_v_stats[__pyx_v_j]).class_weights = NULL;
|
|
22356
|
+
|
|
22336
22357
|
/* "obliquetree/src/metric.pyx":902
|
|
22337
22358
|
* # Mevcut tm allocated bellekleri serbest brak
|
|
22338
22359
|
* for j in range(unique_count):
|
|
22339
22360
|
* if stats[j].class_weights != NULL: # <<<<<<<<<<<<<<
|
|
22340
22361
|
* free(stats[j].class_weights)
|
|
22341
|
-
*
|
|
22362
|
+
* stats[j].class_weights = NULL
|
|
22342
22363
|
*/
|
|
22343
22364
|
}
|
|
22344
22365
|
}
|
|
22345
22366
|
|
|
22346
|
-
/* "obliquetree/src/metric.pyx":
|
|
22347
|
-
* if stats[j].class_weights != NULL:
|
|
22367
|
+
/* "obliquetree/src/metric.pyx":905
|
|
22348
22368
|
* free(stats[j].class_weights)
|
|
22369
|
+
* stats[j].class_weights = NULL
|
|
22349
22370
|
* with gil: # <<<<<<<<<<<<<<
|
|
22350
22371
|
* raise MemoryError()
|
|
22351
22372
|
*
|
|
@@ -22354,19 +22375,19 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
22354
22375
|
PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
|
|
22355
22376
|
/*try:*/ {
|
|
22356
22377
|
|
|
22357
|
-
/* "obliquetree/src/metric.pyx":
|
|
22358
|
-
*
|
|
22378
|
+
/* "obliquetree/src/metric.pyx":906
|
|
22379
|
+
* stats[j].class_weights = NULL
|
|
22359
22380
|
* with gil:
|
|
22360
22381
|
* raise MemoryError() # <<<<<<<<<<<<<<
|
|
22361
22382
|
*
|
|
22362
22383
|
* memset(current_stat.class_weights, 0, n_classes * sizeof(double))
|
|
22363
22384
|
*/
|
|
22364
|
-
PyErr_NoMemory(); __PYX_ERR(0,
|
|
22385
|
+
PyErr_NoMemory(); __PYX_ERR(0, 906, __pyx_L31_error)
|
|
22365
22386
|
}
|
|
22366
22387
|
|
|
22367
|
-
/* "obliquetree/src/metric.pyx":
|
|
22368
|
-
* if stats[j].class_weights != NULL:
|
|
22388
|
+
/* "obliquetree/src/metric.pyx":905
|
|
22369
22389
|
* free(stats[j].class_weights)
|
|
22390
|
+
* stats[j].class_weights = NULL
|
|
22370
22391
|
* with gil: # <<<<<<<<<<<<<<
|
|
22371
22392
|
* raise MemoryError()
|
|
22372
22393
|
*
|
|
@@ -22388,7 +22409,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
22388
22409
|
*/
|
|
22389
22410
|
}
|
|
22390
22411
|
|
|
22391
|
-
/* "obliquetree/src/metric.pyx":
|
|
22412
|
+
/* "obliquetree/src/metric.pyx":908
|
|
22392
22413
|
* raise MemoryError()
|
|
22393
22414
|
*
|
|
22394
22415
|
* memset(current_stat.class_weights, 0, n_classes * sizeof(double)) # <<<<<<<<<<<<<<
|
|
@@ -22397,7 +22418,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
22397
22418
|
*/
|
|
22398
22419
|
(void)(memset(__pyx_v_current_stat->class_weights, 0, (__pyx_v_n_classes * (sizeof(double)))));
|
|
22399
22420
|
|
|
22400
|
-
/* "obliquetree/src/metric.pyx":
|
|
22421
|
+
/* "obliquetree/src/metric.pyx":909
|
|
22401
22422
|
*
|
|
22402
22423
|
* memset(current_stat.class_weights, 0, n_classes * sizeof(double))
|
|
22403
22424
|
* current_stat.class_weights[class_idx] = w # <<<<<<<<<<<<<<
|
|
@@ -22406,7 +22427,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
22406
22427
|
*/
|
|
22407
22428
|
(__pyx_v_current_stat->class_weights[__pyx_v_class_idx]) = __pyx_v_w;
|
|
22408
22429
|
|
|
22409
|
-
/* "obliquetree/src/metric.pyx":
|
|
22430
|
+
/* "obliquetree/src/metric.pyx":910
|
|
22410
22431
|
* memset(current_stat.class_weights, 0, n_classes * sizeof(double))
|
|
22411
22432
|
* current_stat.class_weights[class_idx] = w
|
|
22412
22433
|
* current_stat.weight = w # <<<<<<<<<<<<<<
|
|
@@ -22415,7 +22436,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
22415
22436
|
*/
|
|
22416
22437
|
__pyx_v_current_stat->weight = __pyx_v_w;
|
|
22417
22438
|
|
|
22418
|
-
/* "obliquetree/src/metric.pyx":
|
|
22439
|
+
/* "obliquetree/src/metric.pyx":911
|
|
22419
22440
|
* current_stat.class_weights[class_idx] = w
|
|
22420
22441
|
* current_stat.weight = w
|
|
22421
22442
|
* current_stat.count = 1 # <<<<<<<<<<<<<<
|
|
@@ -22424,7 +22445,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
22424
22445
|
*/
|
|
22425
22446
|
__pyx_v_current_stat->count = 1;
|
|
22426
22447
|
|
|
22427
|
-
/* "obliquetree/src/metric.pyx":
|
|
22448
|
+
/* "obliquetree/src/metric.pyx":913
|
|
22428
22449
|
* current_stat.count = 1
|
|
22429
22450
|
*
|
|
22430
22451
|
* unique_count += 1 # <<<<<<<<<<<<<<
|
|
@@ -22433,7 +22454,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
22433
22454
|
*/
|
|
22434
22455
|
__pyx_v_unique_count = (__pyx_v_unique_count + 1);
|
|
22435
22456
|
|
|
22436
|
-
/* "obliquetree/src/metric.pyx":
|
|
22457
|
+
/* "obliquetree/src/metric.pyx":914
|
|
22437
22458
|
*
|
|
22438
22459
|
* unique_count += 1
|
|
22439
22460
|
* prev_value = current_value # <<<<<<<<<<<<<<
|
|
@@ -22452,7 +22473,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
22452
22473
|
goto __pyx_L23;
|
|
22453
22474
|
}
|
|
22454
22475
|
|
|
22455
|
-
/* "obliquetree/src/metric.pyx":
|
|
22476
|
+
/* "obliquetree/src/metric.pyx":917
|
|
22456
22477
|
* else:
|
|
22457
22478
|
* # Ayn kategoriye ekle
|
|
22458
22479
|
* current_stat.class_weights[class_idx] += w # <<<<<<<<<<<<<<
|
|
@@ -22463,7 +22484,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
22463
22484
|
__pyx_t_6 = __pyx_v_class_idx;
|
|
22464
22485
|
(__pyx_v_current_stat->class_weights[__pyx_t_6]) = ((__pyx_v_current_stat->class_weights[__pyx_t_6]) + __pyx_v_w);
|
|
22465
22486
|
|
|
22466
|
-
/* "obliquetree/src/metric.pyx":
|
|
22487
|
+
/* "obliquetree/src/metric.pyx":918
|
|
22467
22488
|
* # Ayn kategoriye ekle
|
|
22468
22489
|
* current_stat.class_weights[class_idx] += w
|
|
22469
22490
|
* current_stat.weight += w # <<<<<<<<<<<<<<
|
|
@@ -22472,7 +22493,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
22472
22493
|
*/
|
|
22473
22494
|
__pyx_v_current_stat->weight = (__pyx_v_current_stat->weight + __pyx_v_w);
|
|
22474
22495
|
|
|
22475
|
-
/* "obliquetree/src/metric.pyx":
|
|
22496
|
+
/* "obliquetree/src/metric.pyx":919
|
|
22476
22497
|
* current_stat.class_weights[class_idx] += w
|
|
22477
22498
|
* current_stat.weight += w
|
|
22478
22499
|
* current_stat.count += 1 # <<<<<<<<<<<<<<
|
|
@@ -22483,7 +22504,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
22483
22504
|
}
|
|
22484
22505
|
__pyx_L23:;
|
|
22485
22506
|
|
|
22486
|
-
/* "obliquetree/src/metric.pyx":
|
|
22507
|
+
/* "obliquetree/src/metric.pyx":921
|
|
22487
22508
|
* current_stat.count += 1
|
|
22488
22509
|
*
|
|
22489
22510
|
* total_class_weights[class_idx] += w # <<<<<<<<<<<<<<
|
|
@@ -22493,7 +22514,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
22493
22514
|
__pyx_t_6 = __pyx_v_class_idx;
|
|
22494
22515
|
(__pyx_v_total_class_weights[__pyx_t_6]) = ((__pyx_v_total_class_weights[__pyx_t_6]) + __pyx_v_w);
|
|
22495
22516
|
|
|
22496
|
-
/* "obliquetree/src/metric.pyx":
|
|
22517
|
+
/* "obliquetree/src/metric.pyx":922
|
|
22497
22518
|
*
|
|
22498
22519
|
* total_class_weights[class_idx] += w
|
|
22499
22520
|
* total_weight += w # <<<<<<<<<<<<<<
|
|
@@ -22503,7 +22524,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
22503
22524
|
__pyx_v_total_weight = (__pyx_v_total_weight + __pyx_v_w);
|
|
22504
22525
|
}
|
|
22505
22526
|
|
|
22506
|
-
/* "obliquetree/src/metric.pyx":
|
|
22527
|
+
/* "obliquetree/src/metric.pyx":924
|
|
22507
22528
|
* total_weight += w
|
|
22508
22529
|
*
|
|
22509
22530
|
* max_cat = 0 # <<<<<<<<<<<<<<
|
|
@@ -22512,7 +22533,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
22512
22533
|
*/
|
|
22513
22534
|
__pyx_v_max_cat = 0;
|
|
22514
22535
|
|
|
22515
|
-
/* "obliquetree/src/metric.pyx":
|
|
22536
|
+
/* "obliquetree/src/metric.pyx":925
|
|
22516
22537
|
*
|
|
22517
22538
|
* max_cat = 0
|
|
22518
22539
|
* for i in range(unique_count): # <<<<<<<<<<<<<<
|
|
@@ -22524,7 +22545,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
22524
22545
|
for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
|
|
22525
22546
|
__pyx_v_i = __pyx_t_5;
|
|
22526
22547
|
|
|
22527
|
-
/* "obliquetree/src/metric.pyx":
|
|
22548
|
+
/* "obliquetree/src/metric.pyx":926
|
|
22528
22549
|
* max_cat = 0
|
|
22529
22550
|
* for i in range(unique_count):
|
|
22530
22551
|
* stats_val = <int>stats[i].value # <<<<<<<<<<<<<<
|
|
@@ -22533,7 +22554,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
22533
22554
|
*/
|
|
22534
22555
|
__pyx_v_stats_val = ((int)(__pyx_v_stats[__pyx_v_i]).value);
|
|
22535
22556
|
|
|
22536
|
-
/* "obliquetree/src/metric.pyx":
|
|
22557
|
+
/* "obliquetree/src/metric.pyx":927
|
|
22537
22558
|
* for i in range(unique_count):
|
|
22538
22559
|
* stats_val = <int>stats[i].value
|
|
22539
22560
|
* if stats_val > max_cat: # <<<<<<<<<<<<<<
|
|
@@ -22543,7 +22564,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
22543
22564
|
__pyx_t_1 = (__pyx_v_stats_val > __pyx_v_max_cat);
|
|
22544
22565
|
if (__pyx_t_1) {
|
|
22545
22566
|
|
|
22546
|
-
/* "obliquetree/src/metric.pyx":
|
|
22567
|
+
/* "obliquetree/src/metric.pyx":928
|
|
22547
22568
|
* stats_val = <int>stats[i].value
|
|
22548
22569
|
* if stats_val > max_cat:
|
|
22549
22570
|
* max_cat = stats_val # <<<<<<<<<<<<<<
|
|
@@ -22552,7 +22573,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
22552
22573
|
*/
|
|
22553
22574
|
__pyx_v_max_cat = __pyx_v_stats_val;
|
|
22554
22575
|
|
|
22555
|
-
/* "obliquetree/src/metric.pyx":
|
|
22576
|
+
/* "obliquetree/src/metric.pyx":927
|
|
22556
22577
|
* for i in range(unique_count):
|
|
22557
22578
|
* stats_val = <int>stats[i].value
|
|
22558
22579
|
* if stats_val > max_cat: # <<<<<<<<<<<<<<
|
|
@@ -22562,7 +22583,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
22562
22583
|
}
|
|
22563
22584
|
}
|
|
22564
22585
|
|
|
22565
|
-
/* "obliquetree/src/metric.pyx":
|
|
22586
|
+
/* "obliquetree/src/metric.pyx":931
|
|
22566
22587
|
*
|
|
22567
22588
|
* # Kategori dizililerinin cumsum hesaplamas iin
|
|
22568
22589
|
* stats_count = <int*>calloc(max_cat + 1, sizeof(int)) # <<<<<<<<<<<<<<
|
|
@@ -22571,7 +22592,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
22571
22592
|
*/
|
|
22572
22593
|
__pyx_v_stats_count = ((int *)calloc((__pyx_v_max_cat + 1), (sizeof(int))));
|
|
22573
22594
|
|
|
22574
|
-
/* "obliquetree/src/metric.pyx":
|
|
22595
|
+
/* "obliquetree/src/metric.pyx":932
|
|
22575
22596
|
* # Kategori dizililerinin cumsum hesaplamas iin
|
|
22576
22597
|
* stats_count = <int*>calloc(max_cat + 1, sizeof(int))
|
|
22577
22598
|
* if stats_count == NULL: # <<<<<<<<<<<<<<
|
|
@@ -22581,7 +22602,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
22581
22602
|
__pyx_t_1 = (__pyx_v_stats_count == NULL);
|
|
22582
22603
|
if (unlikely(__pyx_t_1)) {
|
|
22583
22604
|
|
|
22584
|
-
/* "obliquetree/src/metric.pyx":
|
|
22605
|
+
/* "obliquetree/src/metric.pyx":933
|
|
22585
22606
|
* stats_count = <int*>calloc(max_cat + 1, sizeof(int))
|
|
22586
22607
|
* if stats_count == NULL:
|
|
22587
22608
|
* with gil: # <<<<<<<<<<<<<<
|
|
@@ -22592,17 +22613,17 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
22592
22613
|
PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
|
|
22593
22614
|
/*try:*/ {
|
|
22594
22615
|
|
|
22595
|
-
/* "obliquetree/src/metric.pyx":
|
|
22616
|
+
/* "obliquetree/src/metric.pyx":934
|
|
22596
22617
|
* if stats_count == NULL:
|
|
22597
22618
|
* with gil:
|
|
22598
22619
|
* raise MemoryError() # <<<<<<<<<<<<<<
|
|
22599
22620
|
*
|
|
22600
22621
|
* new_indices = <int*>calloc(n_samples - n_nans, sizeof(int))
|
|
22601
22622
|
*/
|
|
22602
|
-
PyErr_NoMemory(); __PYX_ERR(0,
|
|
22623
|
+
PyErr_NoMemory(); __PYX_ERR(0, 934, __pyx_L38_error)
|
|
22603
22624
|
}
|
|
22604
22625
|
|
|
22605
|
-
/* "obliquetree/src/metric.pyx":
|
|
22626
|
+
/* "obliquetree/src/metric.pyx":933
|
|
22606
22627
|
* stats_count = <int*>calloc(max_cat + 1, sizeof(int))
|
|
22607
22628
|
* if stats_count == NULL:
|
|
22608
22629
|
* with gil: # <<<<<<<<<<<<<<
|
|
@@ -22617,7 +22638,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
22617
22638
|
}
|
|
22618
22639
|
}
|
|
22619
22640
|
|
|
22620
|
-
/* "obliquetree/src/metric.pyx":
|
|
22641
|
+
/* "obliquetree/src/metric.pyx":932
|
|
22621
22642
|
* # Kategori dizililerinin cumsum hesaplamas iin
|
|
22622
22643
|
* stats_count = <int*>calloc(max_cat + 1, sizeof(int))
|
|
22623
22644
|
* if stats_count == NULL: # <<<<<<<<<<<<<<
|
|
@@ -22626,7 +22647,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
22626
22647
|
*/
|
|
22627
22648
|
}
|
|
22628
22649
|
|
|
22629
|
-
/* "obliquetree/src/metric.pyx":
|
|
22650
|
+
/* "obliquetree/src/metric.pyx":936
|
|
22630
22651
|
* raise MemoryError()
|
|
22631
22652
|
*
|
|
22632
22653
|
* new_indices = <int*>calloc(n_samples - n_nans, sizeof(int)) # <<<<<<<<<<<<<<
|
|
@@ -22635,7 +22656,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
22635
22656
|
*/
|
|
22636
22657
|
__pyx_v_new_indices = ((int *)calloc((__pyx_v_n_samples - __pyx_v_n_nans), (sizeof(int))));
|
|
22637
22658
|
|
|
22638
|
-
/* "obliquetree/src/metric.pyx":
|
|
22659
|
+
/* "obliquetree/src/metric.pyx":937
|
|
22639
22660
|
*
|
|
22640
22661
|
* new_indices = <int*>calloc(n_samples - n_nans, sizeof(int))
|
|
22641
22662
|
* if new_indices == NULL: # <<<<<<<<<<<<<<
|
|
@@ -22645,7 +22666,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
22645
22666
|
__pyx_t_1 = (__pyx_v_new_indices == NULL);
|
|
22646
22667
|
if (unlikely(__pyx_t_1)) {
|
|
22647
22668
|
|
|
22648
|
-
/* "obliquetree/src/metric.pyx":
|
|
22669
|
+
/* "obliquetree/src/metric.pyx":938
|
|
22649
22670
|
* new_indices = <int*>calloc(n_samples - n_nans, sizeof(int))
|
|
22650
22671
|
* if new_indices == NULL:
|
|
22651
22672
|
* with gil: # <<<<<<<<<<<<<<
|
|
@@ -22656,17 +22677,17 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
22656
22677
|
PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
|
|
22657
22678
|
/*try:*/ {
|
|
22658
22679
|
|
|
22659
|
-
/* "obliquetree/src/metric.pyx":
|
|
22680
|
+
/* "obliquetree/src/metric.pyx":939
|
|
22660
22681
|
* if new_indices == NULL:
|
|
22661
22682
|
* with gil:
|
|
22662
22683
|
* raise MemoryError() # <<<<<<<<<<<<<<
|
|
22663
22684
|
*
|
|
22664
22685
|
* best_stats = <CategoryStat*>malloc(unique_count * sizeof(CategoryStat))
|
|
22665
22686
|
*/
|
|
22666
|
-
PyErr_NoMemory(); __PYX_ERR(0,
|
|
22687
|
+
PyErr_NoMemory(); __PYX_ERR(0, 939, __pyx_L42_error)
|
|
22667
22688
|
}
|
|
22668
22689
|
|
|
22669
|
-
/* "obliquetree/src/metric.pyx":
|
|
22690
|
+
/* "obliquetree/src/metric.pyx":938
|
|
22670
22691
|
* new_indices = <int*>calloc(n_samples - n_nans, sizeof(int))
|
|
22671
22692
|
* if new_indices == NULL:
|
|
22672
22693
|
* with gil: # <<<<<<<<<<<<<<
|
|
@@ -22681,7 +22702,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
22681
22702
|
}
|
|
22682
22703
|
}
|
|
22683
22704
|
|
|
22684
|
-
/* "obliquetree/src/metric.pyx":
|
|
22705
|
+
/* "obliquetree/src/metric.pyx":937
|
|
22685
22706
|
*
|
|
22686
22707
|
* new_indices = <int*>calloc(n_samples - n_nans, sizeof(int))
|
|
22687
22708
|
* if new_indices == NULL: # <<<<<<<<<<<<<<
|
|
@@ -22690,7 +22711,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
22690
22711
|
*/
|
|
22691
22712
|
}
|
|
22692
22713
|
|
|
22693
|
-
/* "obliquetree/src/metric.pyx":
|
|
22714
|
+
/* "obliquetree/src/metric.pyx":941
|
|
22694
22715
|
* raise MemoryError()
|
|
22695
22716
|
*
|
|
22696
22717
|
* best_stats = <CategoryStat*>malloc(unique_count * sizeof(CategoryStat)) # <<<<<<<<<<<<<<
|
|
@@ -22699,7 +22720,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
22699
22720
|
*/
|
|
22700
22721
|
__pyx_v_best_stats = ((struct __pyx_t_11obliquetree_3src_4tree_CategoryStat *)malloc((__pyx_v_unique_count * (sizeof(struct __pyx_t_11obliquetree_3src_4tree_CategoryStat)))));
|
|
22701
22722
|
|
|
22702
|
-
/* "obliquetree/src/metric.pyx":
|
|
22723
|
+
/* "obliquetree/src/metric.pyx":942
|
|
22703
22724
|
*
|
|
22704
22725
|
* best_stats = <CategoryStat*>malloc(unique_count * sizeof(CategoryStat))
|
|
22705
22726
|
* if best_stats == NULL: # <<<<<<<<<<<<<<
|
|
@@ -22709,7 +22730,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
22709
22730
|
__pyx_t_1 = (__pyx_v_best_stats == NULL);
|
|
22710
22731
|
if (unlikely(__pyx_t_1)) {
|
|
22711
22732
|
|
|
22712
|
-
/* "obliquetree/src/metric.pyx":
|
|
22733
|
+
/* "obliquetree/src/metric.pyx":943
|
|
22713
22734
|
* best_stats = <CategoryStat*>malloc(unique_count * sizeof(CategoryStat))
|
|
22714
22735
|
* if best_stats == NULL:
|
|
22715
22736
|
* with gil: # <<<<<<<<<<<<<<
|
|
@@ -22720,17 +22741,17 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
22720
22741
|
PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
|
|
22721
22742
|
/*try:*/ {
|
|
22722
22743
|
|
|
22723
|
-
/* "obliquetree/src/metric.pyx":
|
|
22744
|
+
/* "obliquetree/src/metric.pyx":944
|
|
22724
22745
|
* if best_stats == NULL:
|
|
22725
22746
|
* with gil:
|
|
22726
22747
|
* raise MemoryError() # <<<<<<<<<<<<<<
|
|
22727
22748
|
* # Initialize
|
|
22728
22749
|
* memcpy(best_stats, stats, unique_count * sizeof(CategoryStat))
|
|
22729
22750
|
*/
|
|
22730
|
-
PyErr_NoMemory(); __PYX_ERR(0,
|
|
22751
|
+
PyErr_NoMemory(); __PYX_ERR(0, 944, __pyx_L46_error)
|
|
22731
22752
|
}
|
|
22732
22753
|
|
|
22733
|
-
/* "obliquetree/src/metric.pyx":
|
|
22754
|
+
/* "obliquetree/src/metric.pyx":943
|
|
22734
22755
|
* best_stats = <CategoryStat*>malloc(unique_count * sizeof(CategoryStat))
|
|
22735
22756
|
* if best_stats == NULL:
|
|
22736
22757
|
* with gil: # <<<<<<<<<<<<<<
|
|
@@ -22745,7 +22766,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
22745
22766
|
}
|
|
22746
22767
|
}
|
|
22747
22768
|
|
|
22748
|
-
/* "obliquetree/src/metric.pyx":
|
|
22769
|
+
/* "obliquetree/src/metric.pyx":942
|
|
22749
22770
|
*
|
|
22750
22771
|
* best_stats = <CategoryStat*>malloc(unique_count * sizeof(CategoryStat))
|
|
22751
22772
|
* if best_stats == NULL: # <<<<<<<<<<<<<<
|
|
@@ -22754,7 +22775,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
22754
22775
|
*/
|
|
22755
22776
|
}
|
|
22756
22777
|
|
|
22757
|
-
/* "obliquetree/src/metric.pyx":
|
|
22778
|
+
/* "obliquetree/src/metric.pyx":946
|
|
22758
22779
|
* raise MemoryError()
|
|
22759
22780
|
* # Initialize
|
|
22760
22781
|
* memcpy(best_stats, stats, unique_count * sizeof(CategoryStat)) # <<<<<<<<<<<<<<
|
|
@@ -22763,7 +22784,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
22763
22784
|
*/
|
|
22764
22785
|
(void)(memcpy(__pyx_v_best_stats, __pyx_v_stats, (__pyx_v_unique_count * (sizeof(struct __pyx_t_11obliquetree_3src_4tree_CategoryStat)))));
|
|
22765
22786
|
|
|
22766
|
-
/* "obliquetree/src/metric.pyx":
|
|
22787
|
+
/* "obliquetree/src/metric.pyx":949
|
|
22767
22788
|
*
|
|
22768
22789
|
* # Tm permtasyonlar ret
|
|
22769
22790
|
* perm_orders = generate_permutations(n_classes, &perm_count) # <<<<<<<<<<<<<<
|
|
@@ -22772,7 +22793,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
22772
22793
|
*/
|
|
22773
22794
|
__pyx_v_perm_orders = __pyx_f_11obliquetree_3src_5utils_generate_permutations(__pyx_v_n_classes, (&__pyx_v_perm_count));
|
|
22774
22795
|
|
|
22775
|
-
/* "obliquetree/src/metric.pyx":
|
|
22796
|
+
/* "obliquetree/src/metric.pyx":951
|
|
22776
22797
|
* perm_orders = generate_permutations(n_classes, &perm_count)
|
|
22777
22798
|
*
|
|
22778
22799
|
* for k in range(perm_count): # <<<<<<<<<<<<<<
|
|
@@ -22784,7 +22805,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
22784
22805
|
for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
|
|
22785
22806
|
__pyx_v_k = __pyx_t_5;
|
|
22786
22807
|
|
|
22787
|
-
/* "obliquetree/src/metric.pyx":
|
|
22808
|
+
/* "obliquetree/src/metric.pyx":952
|
|
22788
22809
|
*
|
|
22789
22810
|
* for k in range(perm_count):
|
|
22790
22811
|
* sort_category_stats_multiclass(stats, perm_orders[k], unique_count, n_classes) # <<<<<<<<<<<<<<
|
|
@@ -22793,7 +22814,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
22793
22814
|
*/
|
|
22794
22815
|
__pyx_f_11obliquetree_3src_5utils_sort_category_stats_multiclass(__pyx_v_stats, (__pyx_v_perm_orders[__pyx_v_k]), __pyx_v_unique_count, __pyx_v_n_classes);
|
|
22795
22816
|
|
|
22796
|
-
/* "obliquetree/src/metric.pyx":
|
|
22817
|
+
/* "obliquetree/src/metric.pyx":954
|
|
22797
22818
|
* sort_category_stats_multiclass(stats, perm_orders[k], unique_count, n_classes)
|
|
22798
22819
|
*
|
|
22799
22820
|
* min_impurity = category_impurity_multiclass( # <<<<<<<<<<<<<<
|
|
@@ -22802,7 +22823,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
22802
22823
|
*/
|
|
22803
22824
|
__pyx_v_min_impurity = __pyx_f_11obliquetree_3src_6metric_category_impurity_multiclass(__pyx_v_unique_count, __pyx_v_total_class_weights, __pyx_v_total_weight, __pyx_v_nan_class_weights, __pyx_v_nan_weight, __pyx_v_stats, __pyx_v_n_samples, __pyx_v_n_nans, __pyx_v_min_samples_leaf, __pyx_v_n_classes, (&__pyx_v_out_threshold_c), (&__pyx_v_out_left_count_c), (&__pyx_v_out_missing_go_left_c));
|
|
22804
22825
|
|
|
22805
|
-
/* "obliquetree/src/metric.pyx":
|
|
22826
|
+
/* "obliquetree/src/metric.pyx":971
|
|
22806
22827
|
*
|
|
22807
22828
|
* # Daha iyi bir split bulursak gncelle
|
|
22808
22829
|
* if min_impurity < best_impurity: # <<<<<<<<<<<<<<
|
|
@@ -22812,7 +22833,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
22812
22833
|
__pyx_t_1 = (__pyx_v_min_impurity < __pyx_v_best_impurity);
|
|
22813
22834
|
if (__pyx_t_1) {
|
|
22814
22835
|
|
|
22815
|
-
/* "obliquetree/src/metric.pyx":
|
|
22836
|
+
/* "obliquetree/src/metric.pyx":972
|
|
22816
22837
|
* # Daha iyi bir split bulursak gncelle
|
|
22817
22838
|
* if min_impurity < best_impurity:
|
|
22818
22839
|
* out_threshold[0] = out_threshold_c # <<<<<<<<<<<<<<
|
|
@@ -22821,7 +22842,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
22821
22842
|
*/
|
|
22822
22843
|
(__pyx_v_out_threshold[0]) = __pyx_v_out_threshold_c;
|
|
22823
22844
|
|
|
22824
|
-
/* "obliquetree/src/metric.pyx":
|
|
22845
|
+
/* "obliquetree/src/metric.pyx":973
|
|
22825
22846
|
* if min_impurity < best_impurity:
|
|
22826
22847
|
* out_threshold[0] = out_threshold_c
|
|
22827
22848
|
* out_left_count[0] = out_left_count_c # <<<<<<<<<<<<<<
|
|
@@ -22830,7 +22851,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
22830
22851
|
*/
|
|
22831
22852
|
(__pyx_v_out_left_count[0]) = __pyx_v_out_left_count_c;
|
|
22832
22853
|
|
|
22833
|
-
/* "obliquetree/src/metric.pyx":
|
|
22854
|
+
/* "obliquetree/src/metric.pyx":974
|
|
22834
22855
|
* out_threshold[0] = out_threshold_c
|
|
22835
22856
|
* out_left_count[0] = out_left_count_c
|
|
22836
22857
|
* out_missing_go_left[0] = out_missing_go_left_c # <<<<<<<<<<<<<<
|
|
@@ -22839,7 +22860,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
22839
22860
|
*/
|
|
22840
22861
|
(__pyx_v_out_missing_go_left[0]) = __pyx_v_out_missing_go_left_c;
|
|
22841
22862
|
|
|
22842
|
-
/* "obliquetree/src/metric.pyx":
|
|
22863
|
+
/* "obliquetree/src/metric.pyx":975
|
|
22843
22864
|
* out_left_count[0] = out_left_count_c
|
|
22844
22865
|
* out_missing_go_left[0] = out_missing_go_left_c
|
|
22845
22866
|
* best_impurity = min_impurity # <<<<<<<<<<<<<<
|
|
@@ -22848,7 +22869,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
22848
22869
|
*/
|
|
22849
22870
|
__pyx_v_best_impurity = __pyx_v_min_impurity;
|
|
22850
22871
|
|
|
22851
|
-
/* "obliquetree/src/metric.pyx":
|
|
22872
|
+
/* "obliquetree/src/metric.pyx":977
|
|
22852
22873
|
* best_impurity = min_impurity
|
|
22853
22874
|
*
|
|
22854
22875
|
* memcpy(best_stats, stats, unique_count * sizeof(CategoryStat)) # <<<<<<<<<<<<<<
|
|
@@ -22857,7 +22878,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
22857
22878
|
*/
|
|
22858
22879
|
(void)(memcpy(__pyx_v_best_stats, __pyx_v_stats, (__pyx_v_unique_count * (sizeof(struct __pyx_t_11obliquetree_3src_4tree_CategoryStat)))));
|
|
22859
22880
|
|
|
22860
|
-
/* "obliquetree/src/metric.pyx":
|
|
22881
|
+
/* "obliquetree/src/metric.pyx":971
|
|
22861
22882
|
*
|
|
22862
22883
|
* # Daha iyi bir split bulursak gncelle
|
|
22863
22884
|
* if min_impurity < best_impurity: # <<<<<<<<<<<<<<
|
|
@@ -22867,7 +22888,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
22867
22888
|
}
|
|
22868
22889
|
}
|
|
22869
22890
|
|
|
22870
|
-
/* "obliquetree/src/metric.pyx":
|
|
22891
|
+
/* "obliquetree/src/metric.pyx":979
|
|
22871
22892
|
* memcpy(best_stats, stats, unique_count * sizeof(CategoryStat))
|
|
22872
22893
|
*
|
|
22873
22894
|
* cumsum = 0 # <<<<<<<<<<<<<<
|
|
@@ -22876,7 +22897,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
22876
22897
|
*/
|
|
22877
22898
|
__pyx_v_cumsum = 0;
|
|
22878
22899
|
|
|
22879
|
-
/* "obliquetree/src/metric.pyx":
|
|
22900
|
+
/* "obliquetree/src/metric.pyx":980
|
|
22880
22901
|
*
|
|
22881
22902
|
* cumsum = 0
|
|
22882
22903
|
* for i in range(unique_count): # <<<<<<<<<<<<<<
|
|
@@ -22888,7 +22909,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
22888
22909
|
for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
|
|
22889
22910
|
__pyx_v_i = __pyx_t_5;
|
|
22890
22911
|
|
|
22891
|
-
/* "obliquetree/src/metric.pyx":
|
|
22912
|
+
/* "obliquetree/src/metric.pyx":981
|
|
22892
22913
|
* cumsum = 0
|
|
22893
22914
|
* for i in range(unique_count):
|
|
22894
22915
|
* stats_val = <int>best_stats[i].value # <<<<<<<<<<<<<<
|
|
@@ -22897,7 +22918,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
22897
22918
|
*/
|
|
22898
22919
|
__pyx_v_stats_val = ((int)(__pyx_v_best_stats[__pyx_v_i]).value);
|
|
22899
22920
|
|
|
22900
|
-
/* "obliquetree/src/metric.pyx":
|
|
22921
|
+
/* "obliquetree/src/metric.pyx":982
|
|
22901
22922
|
* for i in range(unique_count):
|
|
22902
22923
|
* stats_val = <int>best_stats[i].value
|
|
22903
22924
|
* stats_count[stats_val] = cumsum # <<<<<<<<<<<<<<
|
|
@@ -22906,7 +22927,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
22906
22927
|
*/
|
|
22907
22928
|
(__pyx_v_stats_count[__pyx_v_stats_val]) = __pyx_v_cumsum;
|
|
22908
22929
|
|
|
22909
|
-
/* "obliquetree/src/metric.pyx":
|
|
22930
|
+
/* "obliquetree/src/metric.pyx":983
|
|
22910
22931
|
* stats_val = <int>best_stats[i].value
|
|
22911
22932
|
* stats_count[stats_val] = cumsum
|
|
22912
22933
|
* cumsum += best_stats[i].count # <<<<<<<<<<<<<<
|
|
@@ -22916,7 +22937,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
22916
22937
|
__pyx_v_cumsum = (__pyx_v_cumsum + (__pyx_v_best_stats[__pyx_v_i]).count);
|
|
22917
22938
|
}
|
|
22918
22939
|
|
|
22919
|
-
/* "obliquetree/src/metric.pyx":
|
|
22940
|
+
/* "obliquetree/src/metric.pyx":986
|
|
22920
22941
|
*
|
|
22921
22942
|
* # Yeni sralamaya gre indeksleri diz
|
|
22922
22943
|
* for j in range(n_samples - n_nans): # <<<<<<<<<<<<<<
|
|
@@ -22928,7 +22949,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
22928
22949
|
for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
|
|
22929
22950
|
__pyx_v_j = __pyx_t_5;
|
|
22930
22951
|
|
|
22931
|
-
/* "obliquetree/src/metric.pyx":
|
|
22952
|
+
/* "obliquetree/src/metric.pyx":987
|
|
22932
22953
|
* # Yeni sralamaya gre indeksleri diz
|
|
22933
22954
|
* for j in range(n_samples - n_nans):
|
|
22934
22955
|
* curr_val = <int>sort_buffer[j].value # <<<<<<<<<<<<<<
|
|
@@ -22937,7 +22958,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
22937
22958
|
*/
|
|
22938
22959
|
__pyx_v_curr_val = ((int)(__pyx_v_sort_buffer[__pyx_v_j]).value);
|
|
22939
22960
|
|
|
22940
|
-
/* "obliquetree/src/metric.pyx":
|
|
22961
|
+
/* "obliquetree/src/metric.pyx":988
|
|
22941
22962
|
* for j in range(n_samples - n_nans):
|
|
22942
22963
|
* curr_val = <int>sort_buffer[j].value
|
|
22943
22964
|
* new_indices[stats_count[curr_val]] = sort_buffer[j].index # <<<<<<<<<<<<<<
|
|
@@ -22947,7 +22968,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
22947
22968
|
__pyx_t_6 = (__pyx_v_sort_buffer[__pyx_v_j]).index;
|
|
22948
22969
|
(__pyx_v_new_indices[(__pyx_v_stats_count[__pyx_v_curr_val])]) = __pyx_t_6;
|
|
22949
22970
|
|
|
22950
|
-
/* "obliquetree/src/metric.pyx":
|
|
22971
|
+
/* "obliquetree/src/metric.pyx":989
|
|
22951
22972
|
* curr_val = <int>sort_buffer[j].value
|
|
22952
22973
|
* new_indices[stats_count[curr_val]] = sort_buffer[j].index
|
|
22953
22974
|
* stats_count[curr_val] += 1 # <<<<<<<<<<<<<<
|
|
@@ -22958,7 +22979,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
22958
22979
|
(__pyx_v_stats_count[__pyx_t_6]) = ((__pyx_v_stats_count[__pyx_t_6]) + 1);
|
|
22959
22980
|
}
|
|
22960
22981
|
|
|
22961
|
-
/* "obliquetree/src/metric.pyx":
|
|
22982
|
+
/* "obliquetree/src/metric.pyx":991
|
|
22962
22983
|
* stats_count[curr_val] += 1
|
|
22963
22984
|
*
|
|
22964
22985
|
* for i in range(n_samples - n_nans): # <<<<<<<<<<<<<<
|
|
@@ -22970,7 +22991,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
22970
22991
|
for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
|
|
22971
22992
|
__pyx_v_i = __pyx_t_5;
|
|
22972
22993
|
|
|
22973
|
-
/* "obliquetree/src/metric.pyx":
|
|
22994
|
+
/* "obliquetree/src/metric.pyx":992
|
|
22974
22995
|
*
|
|
22975
22996
|
* for i in range(n_samples - n_nans):
|
|
22976
22997
|
* sort_buffer[i].index = new_indices[i] # <<<<<<<<<<<<<<
|
|
@@ -22980,7 +23001,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
22980
23001
|
(__pyx_v_sort_buffer[__pyx_v_i]).index = (__pyx_v_new_indices[__pyx_v_i]);
|
|
22981
23002
|
}
|
|
22982
23003
|
|
|
22983
|
-
/* "obliquetree/src/metric.pyx":
|
|
23004
|
+
/* "obliquetree/src/metric.pyx":994
|
|
22984
23005
|
* sort_buffer[i].index = new_indices[i]
|
|
22985
23006
|
*
|
|
22986
23007
|
* memcpy(stats, best_stats, unique_count * sizeof(CategoryStat)) # <<<<<<<<<<<<<<
|
|
@@ -22999,7 +23020,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
22999
23020
|
}
|
|
23000
23021
|
}
|
|
23001
23022
|
|
|
23002
|
-
/* "obliquetree/src/metric.pyx":
|
|
23023
|
+
/* "obliquetree/src/metric.pyx":999
|
|
23003
23024
|
*
|
|
23004
23025
|
* # Fonksiyonun sonunda toplu free
|
|
23005
23026
|
* free(total_class_weights) # <<<<<<<<<<<<<<
|
|
@@ -23010,7 +23031,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
23010
23031
|
/*normal exit:*/{
|
|
23011
23032
|
free(__pyx_v_total_class_weights);
|
|
23012
23033
|
|
|
23013
|
-
/* "obliquetree/src/metric.pyx":
|
|
23034
|
+
/* "obliquetree/src/metric.pyx":1000
|
|
23014
23035
|
* # Fonksiyonun sonunda toplu free
|
|
23015
23036
|
* free(total_class_weights)
|
|
23016
23037
|
* free(nan_class_weights) # <<<<<<<<<<<<<<
|
|
@@ -23019,7 +23040,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
23019
23040
|
*/
|
|
23020
23041
|
free(__pyx_v_nan_class_weights);
|
|
23021
23042
|
|
|
23022
|
-
/* "obliquetree/src/metric.pyx":
|
|
23043
|
+
/* "obliquetree/src/metric.pyx":1002
|
|
23023
23044
|
* free(nan_class_weights)
|
|
23024
23045
|
*
|
|
23025
23046
|
* if stats_count != NULL: # <<<<<<<<<<<<<<
|
|
@@ -23029,7 +23050,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
23029
23050
|
__pyx_t_1 = (__pyx_v_stats_count != NULL);
|
|
23030
23051
|
if (__pyx_t_1) {
|
|
23031
23052
|
|
|
23032
|
-
/* "obliquetree/src/metric.pyx":
|
|
23053
|
+
/* "obliquetree/src/metric.pyx":1003
|
|
23033
23054
|
*
|
|
23034
23055
|
* if stats_count != NULL:
|
|
23035
23056
|
* free(stats_count) # <<<<<<<<<<<<<<
|
|
@@ -23038,7 +23059,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
23038
23059
|
*/
|
|
23039
23060
|
free(__pyx_v_stats_count);
|
|
23040
23061
|
|
|
23041
|
-
/* "obliquetree/src/metric.pyx":
|
|
23062
|
+
/* "obliquetree/src/metric.pyx":1002
|
|
23042
23063
|
* free(nan_class_weights)
|
|
23043
23064
|
*
|
|
23044
23065
|
* if stats_count != NULL: # <<<<<<<<<<<<<<
|
|
@@ -23047,7 +23068,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
23047
23068
|
*/
|
|
23048
23069
|
}
|
|
23049
23070
|
|
|
23050
|
-
/* "obliquetree/src/metric.pyx":
|
|
23071
|
+
/* "obliquetree/src/metric.pyx":1004
|
|
23051
23072
|
* if stats_count != NULL:
|
|
23052
23073
|
* free(stats_count)
|
|
23053
23074
|
* if new_indices != NULL: # <<<<<<<<<<<<<<
|
|
@@ -23057,7 +23078,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
23057
23078
|
__pyx_t_1 = (__pyx_v_new_indices != NULL);
|
|
23058
23079
|
if (__pyx_t_1) {
|
|
23059
23080
|
|
|
23060
|
-
/* "obliquetree/src/metric.pyx":
|
|
23081
|
+
/* "obliquetree/src/metric.pyx":1005
|
|
23061
23082
|
* free(stats_count)
|
|
23062
23083
|
* if new_indices != NULL:
|
|
23063
23084
|
* free(new_indices) # <<<<<<<<<<<<<<
|
|
@@ -23066,7 +23087,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
23066
23087
|
*/
|
|
23067
23088
|
free(__pyx_v_new_indices);
|
|
23068
23089
|
|
|
23069
|
-
/* "obliquetree/src/metric.pyx":
|
|
23090
|
+
/* "obliquetree/src/metric.pyx":1004
|
|
23070
23091
|
* if stats_count != NULL:
|
|
23071
23092
|
* free(stats_count)
|
|
23072
23093
|
* if new_indices != NULL: # <<<<<<<<<<<<<<
|
|
@@ -23075,7 +23096,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
23075
23096
|
*/
|
|
23076
23097
|
}
|
|
23077
23098
|
|
|
23078
|
-
/* "obliquetree/src/metric.pyx":
|
|
23099
|
+
/* "obliquetree/src/metric.pyx":1006
|
|
23079
23100
|
* if new_indices != NULL:
|
|
23080
23101
|
* free(new_indices)
|
|
23081
23102
|
* if best_stats != NULL: # <<<<<<<<<<<<<<
|
|
@@ -23085,7 +23106,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
23085
23106
|
__pyx_t_1 = (__pyx_v_best_stats != NULL);
|
|
23086
23107
|
if (__pyx_t_1) {
|
|
23087
23108
|
|
|
23088
|
-
/* "obliquetree/src/metric.pyx":
|
|
23109
|
+
/* "obliquetree/src/metric.pyx":1007
|
|
23089
23110
|
* free(new_indices)
|
|
23090
23111
|
* if best_stats != NULL:
|
|
23091
23112
|
* free(best_stats) # <<<<<<<<<<<<<<
|
|
@@ -23094,7 +23115,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
23094
23115
|
*/
|
|
23095
23116
|
free(__pyx_v_best_stats);
|
|
23096
23117
|
|
|
23097
|
-
/* "obliquetree/src/metric.pyx":
|
|
23118
|
+
/* "obliquetree/src/metric.pyx":1006
|
|
23098
23119
|
* if new_indices != NULL:
|
|
23099
23120
|
* free(new_indices)
|
|
23100
23121
|
* if best_stats != NULL: # <<<<<<<<<<<<<<
|
|
@@ -23103,7 +23124,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
23103
23124
|
*/
|
|
23104
23125
|
}
|
|
23105
23126
|
|
|
23106
|
-
/* "obliquetree/src/metric.pyx":
|
|
23127
|
+
/* "obliquetree/src/metric.pyx":1010
|
|
23107
23128
|
*
|
|
23108
23129
|
* # class_weights belleklerini serbest brak
|
|
23109
23130
|
* if stats != NULL: # <<<<<<<<<<<<<<
|
|
@@ -23113,7 +23134,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
23113
23134
|
__pyx_t_1 = (__pyx_v_stats != NULL);
|
|
23114
23135
|
if (__pyx_t_1) {
|
|
23115
23136
|
|
|
23116
|
-
/* "obliquetree/src/metric.pyx":
|
|
23137
|
+
/* "obliquetree/src/metric.pyx":1011
|
|
23117
23138
|
* # class_weights belleklerini serbest brak
|
|
23118
23139
|
* if stats != NULL:
|
|
23119
23140
|
* for i in range(unique_count): # <<<<<<<<<<<<<<
|
|
@@ -23125,7 +23146,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
23125
23146
|
for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
|
|
23126
23147
|
__pyx_v_i = __pyx_t_5;
|
|
23127
23148
|
|
|
23128
|
-
/* "obliquetree/src/metric.pyx":
|
|
23149
|
+
/* "obliquetree/src/metric.pyx":1012
|
|
23129
23150
|
* if stats != NULL:
|
|
23130
23151
|
* for i in range(unique_count):
|
|
23131
23152
|
* if stats[i].class_weights != NULL: # <<<<<<<<<<<<<<
|
|
@@ -23135,7 +23156,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
23135
23156
|
__pyx_t_1 = ((__pyx_v_stats[__pyx_v_i]).class_weights != NULL);
|
|
23136
23157
|
if (__pyx_t_1) {
|
|
23137
23158
|
|
|
23138
|
-
/* "obliquetree/src/metric.pyx":
|
|
23159
|
+
/* "obliquetree/src/metric.pyx":1013
|
|
23139
23160
|
* for i in range(unique_count):
|
|
23140
23161
|
* if stats[i].class_weights != NULL:
|
|
23141
23162
|
* free(stats[i].class_weights) # <<<<<<<<<<<<<<
|
|
@@ -23144,7 +23165,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
23144
23165
|
*/
|
|
23145
23166
|
free((__pyx_v_stats[__pyx_v_i]).class_weights);
|
|
23146
23167
|
|
|
23147
|
-
/* "obliquetree/src/metric.pyx":
|
|
23168
|
+
/* "obliquetree/src/metric.pyx":1014
|
|
23148
23169
|
* if stats[i].class_weights != NULL:
|
|
23149
23170
|
* free(stats[i].class_weights)
|
|
23150
23171
|
* stats[i].class_weights = NULL # <<<<<<<<<<<<<<
|
|
@@ -23153,7 +23174,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
23153
23174
|
*/
|
|
23154
23175
|
(__pyx_v_stats[__pyx_v_i]).class_weights = NULL;
|
|
23155
23176
|
|
|
23156
|
-
/* "obliquetree/src/metric.pyx":
|
|
23177
|
+
/* "obliquetree/src/metric.pyx":1012
|
|
23157
23178
|
* if stats != NULL:
|
|
23158
23179
|
* for i in range(unique_count):
|
|
23159
23180
|
* if stats[i].class_weights != NULL: # <<<<<<<<<<<<<<
|
|
@@ -23163,7 +23184,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
23163
23184
|
}
|
|
23164
23185
|
}
|
|
23165
23186
|
|
|
23166
|
-
/* "obliquetree/src/metric.pyx":
|
|
23187
|
+
/* "obliquetree/src/metric.pyx":1010
|
|
23167
23188
|
*
|
|
23168
23189
|
* # class_weights belleklerini serbest brak
|
|
23169
23190
|
* if stats != NULL: # <<<<<<<<<<<<<<
|
|
@@ -23172,7 +23193,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
23172
23193
|
*/
|
|
23173
23194
|
}
|
|
23174
23195
|
|
|
23175
|
-
/* "obliquetree/src/metric.pyx":
|
|
23196
|
+
/* "obliquetree/src/metric.pyx":1017
|
|
23176
23197
|
*
|
|
23177
23198
|
* # permtasyon belleklerini serbest brak
|
|
23178
23199
|
* if perm_orders != NULL: # <<<<<<<<<<<<<<
|
|
@@ -23182,7 +23203,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
23182
23203
|
__pyx_t_1 = (__pyx_v_perm_orders != NULL);
|
|
23183
23204
|
if (__pyx_t_1) {
|
|
23184
23205
|
|
|
23185
|
-
/* "obliquetree/src/metric.pyx":
|
|
23206
|
+
/* "obliquetree/src/metric.pyx":1018
|
|
23186
23207
|
* # permtasyon belleklerini serbest brak
|
|
23187
23208
|
* if perm_orders != NULL:
|
|
23188
23209
|
* for i in range(perm_count): # <<<<<<<<<<<<<<
|
|
@@ -23194,7 +23215,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
23194
23215
|
for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
|
|
23195
23216
|
__pyx_v_i = __pyx_t_5;
|
|
23196
23217
|
|
|
23197
|
-
/* "obliquetree/src/metric.pyx":
|
|
23218
|
+
/* "obliquetree/src/metric.pyx":1019
|
|
23198
23219
|
* if perm_orders != NULL:
|
|
23199
23220
|
* for i in range(perm_count):
|
|
23200
23221
|
* if perm_orders[i] != NULL: # <<<<<<<<<<<<<<
|
|
@@ -23204,7 +23225,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
23204
23225
|
__pyx_t_1 = ((__pyx_v_perm_orders[__pyx_v_i]) != NULL);
|
|
23205
23226
|
if (__pyx_t_1) {
|
|
23206
23227
|
|
|
23207
|
-
/* "obliquetree/src/metric.pyx":
|
|
23228
|
+
/* "obliquetree/src/metric.pyx":1020
|
|
23208
23229
|
* for i in range(perm_count):
|
|
23209
23230
|
* if perm_orders[i] != NULL:
|
|
23210
23231
|
* free(perm_orders[i]) # <<<<<<<<<<<<<<
|
|
@@ -23213,7 +23234,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
23213
23234
|
*/
|
|
23214
23235
|
free((__pyx_v_perm_orders[__pyx_v_i]));
|
|
23215
23236
|
|
|
23216
|
-
/* "obliquetree/src/metric.pyx":
|
|
23237
|
+
/* "obliquetree/src/metric.pyx":1019
|
|
23217
23238
|
* if perm_orders != NULL:
|
|
23218
23239
|
* for i in range(perm_count):
|
|
23219
23240
|
* if perm_orders[i] != NULL: # <<<<<<<<<<<<<<
|
|
@@ -23223,7 +23244,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
23223
23244
|
}
|
|
23224
23245
|
}
|
|
23225
23246
|
|
|
23226
|
-
/* "obliquetree/src/metric.pyx":
|
|
23247
|
+
/* "obliquetree/src/metric.pyx":1021
|
|
23227
23248
|
* if perm_orders[i] != NULL:
|
|
23228
23249
|
* free(perm_orders[i])
|
|
23229
23250
|
* free(perm_orders) # <<<<<<<<<<<<<<
|
|
@@ -23232,7 +23253,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
23232
23253
|
*/
|
|
23233
23254
|
free(__pyx_v_perm_orders);
|
|
23234
23255
|
|
|
23235
|
-
/* "obliquetree/src/metric.pyx":
|
|
23256
|
+
/* "obliquetree/src/metric.pyx":1017
|
|
23236
23257
|
*
|
|
23237
23258
|
* # permtasyon belleklerini serbest brak
|
|
23238
23259
|
* if perm_orders != NULL: # <<<<<<<<<<<<<<
|
|
@@ -23261,7 +23282,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
23261
23282
|
__Pyx_PyGILState_Release(__pyx_gilstate_save);
|
|
23262
23283
|
{
|
|
23263
23284
|
|
|
23264
|
-
/* "obliquetree/src/metric.pyx":
|
|
23285
|
+
/* "obliquetree/src/metric.pyx":999
|
|
23265
23286
|
*
|
|
23266
23287
|
* # Fonksiyonun sonunda toplu free
|
|
23267
23288
|
* free(total_class_weights) # <<<<<<<<<<<<<<
|
|
@@ -23270,7 +23291,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
23270
23291
|
*/
|
|
23271
23292
|
free(__pyx_v_total_class_weights);
|
|
23272
23293
|
|
|
23273
|
-
/* "obliquetree/src/metric.pyx":
|
|
23294
|
+
/* "obliquetree/src/metric.pyx":1000
|
|
23274
23295
|
* # Fonksiyonun sonunda toplu free
|
|
23275
23296
|
* free(total_class_weights)
|
|
23276
23297
|
* free(nan_class_weights) # <<<<<<<<<<<<<<
|
|
@@ -23279,7 +23300,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
23279
23300
|
*/
|
|
23280
23301
|
free(__pyx_v_nan_class_weights);
|
|
23281
23302
|
|
|
23282
|
-
/* "obliquetree/src/metric.pyx":
|
|
23303
|
+
/* "obliquetree/src/metric.pyx":1002
|
|
23283
23304
|
* free(nan_class_weights)
|
|
23284
23305
|
*
|
|
23285
23306
|
* if stats_count != NULL: # <<<<<<<<<<<<<<
|
|
@@ -23289,7 +23310,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
23289
23310
|
__pyx_t_1 = (__pyx_v_stats_count != NULL);
|
|
23290
23311
|
if (__pyx_t_1) {
|
|
23291
23312
|
|
|
23292
|
-
/* "obliquetree/src/metric.pyx":
|
|
23313
|
+
/* "obliquetree/src/metric.pyx":1003
|
|
23293
23314
|
*
|
|
23294
23315
|
* if stats_count != NULL:
|
|
23295
23316
|
* free(stats_count) # <<<<<<<<<<<<<<
|
|
@@ -23298,7 +23319,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
23298
23319
|
*/
|
|
23299
23320
|
free(__pyx_v_stats_count);
|
|
23300
23321
|
|
|
23301
|
-
/* "obliquetree/src/metric.pyx":
|
|
23322
|
+
/* "obliquetree/src/metric.pyx":1002
|
|
23302
23323
|
* free(nan_class_weights)
|
|
23303
23324
|
*
|
|
23304
23325
|
* if stats_count != NULL: # <<<<<<<<<<<<<<
|
|
@@ -23307,7 +23328,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
23307
23328
|
*/
|
|
23308
23329
|
}
|
|
23309
23330
|
|
|
23310
|
-
/* "obliquetree/src/metric.pyx":
|
|
23331
|
+
/* "obliquetree/src/metric.pyx":1004
|
|
23311
23332
|
* if stats_count != NULL:
|
|
23312
23333
|
* free(stats_count)
|
|
23313
23334
|
* if new_indices != NULL: # <<<<<<<<<<<<<<
|
|
@@ -23317,7 +23338,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
23317
23338
|
__pyx_t_1 = (__pyx_v_new_indices != NULL);
|
|
23318
23339
|
if (__pyx_t_1) {
|
|
23319
23340
|
|
|
23320
|
-
/* "obliquetree/src/metric.pyx":
|
|
23341
|
+
/* "obliquetree/src/metric.pyx":1005
|
|
23321
23342
|
* free(stats_count)
|
|
23322
23343
|
* if new_indices != NULL:
|
|
23323
23344
|
* free(new_indices) # <<<<<<<<<<<<<<
|
|
@@ -23326,7 +23347,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
23326
23347
|
*/
|
|
23327
23348
|
free(__pyx_v_new_indices);
|
|
23328
23349
|
|
|
23329
|
-
/* "obliquetree/src/metric.pyx":
|
|
23350
|
+
/* "obliquetree/src/metric.pyx":1004
|
|
23330
23351
|
* if stats_count != NULL:
|
|
23331
23352
|
* free(stats_count)
|
|
23332
23353
|
* if new_indices != NULL: # <<<<<<<<<<<<<<
|
|
@@ -23335,7 +23356,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
23335
23356
|
*/
|
|
23336
23357
|
}
|
|
23337
23358
|
|
|
23338
|
-
/* "obliquetree/src/metric.pyx":
|
|
23359
|
+
/* "obliquetree/src/metric.pyx":1006
|
|
23339
23360
|
* if new_indices != NULL:
|
|
23340
23361
|
* free(new_indices)
|
|
23341
23362
|
* if best_stats != NULL: # <<<<<<<<<<<<<<
|
|
@@ -23345,7 +23366,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
23345
23366
|
__pyx_t_1 = (__pyx_v_best_stats != NULL);
|
|
23346
23367
|
if (__pyx_t_1) {
|
|
23347
23368
|
|
|
23348
|
-
/* "obliquetree/src/metric.pyx":
|
|
23369
|
+
/* "obliquetree/src/metric.pyx":1007
|
|
23349
23370
|
* free(new_indices)
|
|
23350
23371
|
* if best_stats != NULL:
|
|
23351
23372
|
* free(best_stats) # <<<<<<<<<<<<<<
|
|
@@ -23354,7 +23375,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
23354
23375
|
*/
|
|
23355
23376
|
free(__pyx_v_best_stats);
|
|
23356
23377
|
|
|
23357
|
-
/* "obliquetree/src/metric.pyx":
|
|
23378
|
+
/* "obliquetree/src/metric.pyx":1006
|
|
23358
23379
|
* if new_indices != NULL:
|
|
23359
23380
|
* free(new_indices)
|
|
23360
23381
|
* if best_stats != NULL: # <<<<<<<<<<<<<<
|
|
@@ -23363,7 +23384,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
23363
23384
|
*/
|
|
23364
23385
|
}
|
|
23365
23386
|
|
|
23366
|
-
/* "obliquetree/src/metric.pyx":
|
|
23387
|
+
/* "obliquetree/src/metric.pyx":1010
|
|
23367
23388
|
*
|
|
23368
23389
|
* # class_weights belleklerini serbest brak
|
|
23369
23390
|
* if stats != NULL: # <<<<<<<<<<<<<<
|
|
@@ -23373,7 +23394,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
23373
23394
|
__pyx_t_1 = (__pyx_v_stats != NULL);
|
|
23374
23395
|
if (__pyx_t_1) {
|
|
23375
23396
|
|
|
23376
|
-
/* "obliquetree/src/metric.pyx":
|
|
23397
|
+
/* "obliquetree/src/metric.pyx":1011
|
|
23377
23398
|
* # class_weights belleklerini serbest brak
|
|
23378
23399
|
* if stats != NULL:
|
|
23379
23400
|
* for i in range(unique_count): # <<<<<<<<<<<<<<
|
|
@@ -23385,7 +23406,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
23385
23406
|
for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_6; __pyx_t_8+=1) {
|
|
23386
23407
|
__pyx_v_i = __pyx_t_8;
|
|
23387
23408
|
|
|
23388
|
-
/* "obliquetree/src/metric.pyx":
|
|
23409
|
+
/* "obliquetree/src/metric.pyx":1012
|
|
23389
23410
|
* if stats != NULL:
|
|
23390
23411
|
* for i in range(unique_count):
|
|
23391
23412
|
* if stats[i].class_weights != NULL: # <<<<<<<<<<<<<<
|
|
@@ -23395,7 +23416,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
23395
23416
|
__pyx_t_1 = ((__pyx_v_stats[__pyx_v_i]).class_weights != NULL);
|
|
23396
23417
|
if (__pyx_t_1) {
|
|
23397
23418
|
|
|
23398
|
-
/* "obliquetree/src/metric.pyx":
|
|
23419
|
+
/* "obliquetree/src/metric.pyx":1013
|
|
23399
23420
|
* for i in range(unique_count):
|
|
23400
23421
|
* if stats[i].class_weights != NULL:
|
|
23401
23422
|
* free(stats[i].class_weights) # <<<<<<<<<<<<<<
|
|
@@ -23404,7 +23425,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
23404
23425
|
*/
|
|
23405
23426
|
free((__pyx_v_stats[__pyx_v_i]).class_weights);
|
|
23406
23427
|
|
|
23407
|
-
/* "obliquetree/src/metric.pyx":
|
|
23428
|
+
/* "obliquetree/src/metric.pyx":1014
|
|
23408
23429
|
* if stats[i].class_weights != NULL:
|
|
23409
23430
|
* free(stats[i].class_weights)
|
|
23410
23431
|
* stats[i].class_weights = NULL # <<<<<<<<<<<<<<
|
|
@@ -23413,7 +23434,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
23413
23434
|
*/
|
|
23414
23435
|
(__pyx_v_stats[__pyx_v_i]).class_weights = NULL;
|
|
23415
23436
|
|
|
23416
|
-
/* "obliquetree/src/metric.pyx":
|
|
23437
|
+
/* "obliquetree/src/metric.pyx":1012
|
|
23417
23438
|
* if stats != NULL:
|
|
23418
23439
|
* for i in range(unique_count):
|
|
23419
23440
|
* if stats[i].class_weights != NULL: # <<<<<<<<<<<<<<
|
|
@@ -23423,7 +23444,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
23423
23444
|
}
|
|
23424
23445
|
}
|
|
23425
23446
|
|
|
23426
|
-
/* "obliquetree/src/metric.pyx":
|
|
23447
|
+
/* "obliquetree/src/metric.pyx":1010
|
|
23427
23448
|
*
|
|
23428
23449
|
* # class_weights belleklerini serbest brak
|
|
23429
23450
|
* if stats != NULL: # <<<<<<<<<<<<<<
|
|
@@ -23432,7 +23453,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
23432
23453
|
*/
|
|
23433
23454
|
}
|
|
23434
23455
|
|
|
23435
|
-
/* "obliquetree/src/metric.pyx":
|
|
23456
|
+
/* "obliquetree/src/metric.pyx":1017
|
|
23436
23457
|
*
|
|
23437
23458
|
* # permtasyon belleklerini serbest brak
|
|
23438
23459
|
* if perm_orders != NULL: # <<<<<<<<<<<<<<
|
|
@@ -23442,7 +23463,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
23442
23463
|
__pyx_t_1 = (__pyx_v_perm_orders != NULL);
|
|
23443
23464
|
if (__pyx_t_1) {
|
|
23444
23465
|
|
|
23445
|
-
/* "obliquetree/src/metric.pyx":
|
|
23466
|
+
/* "obliquetree/src/metric.pyx":1018
|
|
23446
23467
|
* # permtasyon belleklerini serbest brak
|
|
23447
23468
|
* if perm_orders != NULL:
|
|
23448
23469
|
* for i in range(perm_count): # <<<<<<<<<<<<<<
|
|
@@ -23454,7 +23475,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
23454
23475
|
for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_6; __pyx_t_8+=1) {
|
|
23455
23476
|
__pyx_v_i = __pyx_t_8;
|
|
23456
23477
|
|
|
23457
|
-
/* "obliquetree/src/metric.pyx":
|
|
23478
|
+
/* "obliquetree/src/metric.pyx":1019
|
|
23458
23479
|
* if perm_orders != NULL:
|
|
23459
23480
|
* for i in range(perm_count):
|
|
23460
23481
|
* if perm_orders[i] != NULL: # <<<<<<<<<<<<<<
|
|
@@ -23464,7 +23485,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
23464
23485
|
__pyx_t_1 = ((__pyx_v_perm_orders[__pyx_v_i]) != NULL);
|
|
23465
23486
|
if (__pyx_t_1) {
|
|
23466
23487
|
|
|
23467
|
-
/* "obliquetree/src/metric.pyx":
|
|
23488
|
+
/* "obliquetree/src/metric.pyx":1020
|
|
23468
23489
|
* for i in range(perm_count):
|
|
23469
23490
|
* if perm_orders[i] != NULL:
|
|
23470
23491
|
* free(perm_orders[i]) # <<<<<<<<<<<<<<
|
|
@@ -23473,7 +23494,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
23473
23494
|
*/
|
|
23474
23495
|
free((__pyx_v_perm_orders[__pyx_v_i]));
|
|
23475
23496
|
|
|
23476
|
-
/* "obliquetree/src/metric.pyx":
|
|
23497
|
+
/* "obliquetree/src/metric.pyx":1019
|
|
23477
23498
|
* if perm_orders != NULL:
|
|
23478
23499
|
* for i in range(perm_count):
|
|
23479
23500
|
* if perm_orders[i] != NULL: # <<<<<<<<<<<<<<
|
|
@@ -23483,7 +23504,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
23483
23504
|
}
|
|
23484
23505
|
}
|
|
23485
23506
|
|
|
23486
|
-
/* "obliquetree/src/metric.pyx":
|
|
23507
|
+
/* "obliquetree/src/metric.pyx":1021
|
|
23487
23508
|
* if perm_orders[i] != NULL:
|
|
23488
23509
|
* free(perm_orders[i])
|
|
23489
23510
|
* free(perm_orders) # <<<<<<<<<<<<<<
|
|
@@ -23492,7 +23513,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
23492
23513
|
*/
|
|
23493
23514
|
free(__pyx_v_perm_orders);
|
|
23494
23515
|
|
|
23495
|
-
/* "obliquetree/src/metric.pyx":
|
|
23516
|
+
/* "obliquetree/src/metric.pyx":1017
|
|
23496
23517
|
*
|
|
23497
23518
|
* # permtasyon belleklerini serbest brak
|
|
23498
23519
|
* if perm_orders != NULL: # <<<<<<<<<<<<<<
|
|
@@ -23519,7 +23540,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
23519
23540
|
__pyx_L13:;
|
|
23520
23541
|
}
|
|
23521
23542
|
|
|
23522
|
-
/* "obliquetree/src/metric.pyx":
|
|
23543
|
+
/* "obliquetree/src/metric.pyx":1023
|
|
23523
23544
|
* free(perm_orders)
|
|
23524
23545
|
*
|
|
23525
23546
|
* return best_impurity # <<<<<<<<<<<<<<
|
|
@@ -23548,7 +23569,7 @@ static double __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical
|
|
|
23548
23569
|
return __pyx_r;
|
|
23549
23570
|
}
|
|
23550
23571
|
|
|
23551
|
-
/* "obliquetree/src/metric.pyx":
|
|
23572
|
+
/* "obliquetree/src/metric.pyx":1026
|
|
23552
23573
|
*
|
|
23553
23574
|
*
|
|
23554
23575
|
* cdef double calculate_impurity( # <<<<<<<<<<<<<<
|
|
@@ -23561,7 +23582,7 @@ static double __pyx_f_11obliquetree_3src_6metric_calculate_impurity(int const __
|
|
|
23561
23582
|
double __pyx_r;
|
|
23562
23583
|
int __pyx_t_1;
|
|
23563
23584
|
|
|
23564
|
-
/* "obliquetree/src/metric.pyx":
|
|
23585
|
+
/* "obliquetree/src/metric.pyx":1044
|
|
23565
23586
|
* cdef double impurity_c
|
|
23566
23587
|
*
|
|
23567
23588
|
* if is_categorical: # <<<<<<<<<<<<<<
|
|
@@ -23571,7 +23592,7 @@ static double __pyx_f_11obliquetree_3src_6metric_calculate_impurity(int const __
|
|
|
23571
23592
|
__pyx_t_1 = (__pyx_v_is_categorical != 0);
|
|
23572
23593
|
if (__pyx_t_1) {
|
|
23573
23594
|
|
|
23574
|
-
/* "obliquetree/src/metric.pyx":
|
|
23595
|
+
/* "obliquetree/src/metric.pyx":1045
|
|
23575
23596
|
*
|
|
23576
23597
|
* if is_categorical:
|
|
23577
23598
|
* if n_classes > 2: # <<<<<<<<<<<<<<
|
|
@@ -23581,7 +23602,7 @@ static double __pyx_f_11obliquetree_3src_6metric_calculate_impurity(int const __
|
|
|
23581
23602
|
__pyx_t_1 = (__pyx_v_n_classes > 2);
|
|
23582
23603
|
if (__pyx_t_1) {
|
|
23583
23604
|
|
|
23584
|
-
/* "obliquetree/src/metric.pyx":
|
|
23605
|
+
/* "obliquetree/src/metric.pyx":1046
|
|
23585
23606
|
* if is_categorical:
|
|
23586
23607
|
* if n_classes > 2:
|
|
23587
23608
|
* impurity_c = find_best_split_for_categorical_multiclass( # <<<<<<<<<<<<<<
|
|
@@ -23590,7 +23611,7 @@ static double __pyx_f_11obliquetree_3src_6metric_calculate_impurity(int const __
|
|
|
23590
23611
|
*/
|
|
23591
23612
|
__pyx_v_impurity_c = __pyx_f_11obliquetree_3src_6metric_find_best_split_for_categorical_multiclass(__pyx_v_sort_buffer, __pyx_v_sample_weight, __pyx_v_y, __pyx_v_nan_indices, __pyx_v_categorical_stats, __pyx_v_n_samples, __pyx_v_n_nans, __pyx_v_min_samples_leaf, __pyx_v_n_classes, __pyx_v_threshold_c, __pyx_v_left_count_c, __pyx_v_missing_go_left);
|
|
23592
23613
|
|
|
23593
|
-
/* "obliquetree/src/metric.pyx":
|
|
23614
|
+
/* "obliquetree/src/metric.pyx":1045
|
|
23594
23615
|
*
|
|
23595
23616
|
* if is_categorical:
|
|
23596
23617
|
* if n_classes > 2: # <<<<<<<<<<<<<<
|
|
@@ -23600,7 +23621,7 @@ static double __pyx_f_11obliquetree_3src_6metric_calculate_impurity(int const __
|
|
|
23600
23621
|
goto __pyx_L4;
|
|
23601
23622
|
}
|
|
23602
23623
|
|
|
23603
|
-
/* "obliquetree/src/metric.pyx":
|
|
23624
|
+
/* "obliquetree/src/metric.pyx":1063
|
|
23604
23625
|
*
|
|
23605
23626
|
* else:
|
|
23606
23627
|
* impurity_c = find_best_split_for_categorical( # <<<<<<<<<<<<<<
|
|
@@ -23609,7 +23630,7 @@ static double __pyx_f_11obliquetree_3src_6metric_calculate_impurity(int const __
|
|
|
23609
23630
|
*/
|
|
23610
23631
|
/*else*/ {
|
|
23611
23632
|
|
|
23612
|
-
/* "obliquetree/src/metric.pyx":
|
|
23633
|
+
/* "obliquetree/src/metric.pyx":1075
|
|
23613
23634
|
* threshold_c,
|
|
23614
23635
|
* left_count_c,
|
|
23615
23636
|
* missing_go_left, # <<<<<<<<<<<<<<
|
|
@@ -23620,7 +23641,7 @@ static double __pyx_f_11obliquetree_3src_6metric_calculate_impurity(int const __
|
|
|
23620
23641
|
}
|
|
23621
23642
|
__pyx_L4:;
|
|
23622
23643
|
|
|
23623
|
-
/* "obliquetree/src/metric.pyx":
|
|
23644
|
+
/* "obliquetree/src/metric.pyx":1044
|
|
23624
23645
|
* cdef double impurity_c
|
|
23625
23646
|
*
|
|
23626
23647
|
* if is_categorical: # <<<<<<<<<<<<<<
|
|
@@ -23630,7 +23651,7 @@ static double __pyx_f_11obliquetree_3src_6metric_calculate_impurity(int const __
|
|
|
23630
23651
|
goto __pyx_L3;
|
|
23631
23652
|
}
|
|
23632
23653
|
|
|
23633
|
-
/* "obliquetree/src/metric.pyx":
|
|
23654
|
+
/* "obliquetree/src/metric.pyx":1079
|
|
23634
23655
|
*
|
|
23635
23656
|
* else:
|
|
23636
23657
|
* if n_classes > 2: # <<<<<<<<<<<<<<
|
|
@@ -23641,7 +23662,7 @@ static double __pyx_f_11obliquetree_3src_6metric_calculate_impurity(int const __
|
|
|
23641
23662
|
__pyx_t_1 = (__pyx_v_n_classes > 2);
|
|
23642
23663
|
if (__pyx_t_1) {
|
|
23643
23664
|
|
|
23644
|
-
/* "obliquetree/src/metric.pyx":
|
|
23665
|
+
/* "obliquetree/src/metric.pyx":1080
|
|
23645
23666
|
* else:
|
|
23646
23667
|
* if n_classes > 2:
|
|
23647
23668
|
* impurity_c = find_best_split_for_feature_multiclass( # <<<<<<<<<<<<<<
|
|
@@ -23650,7 +23671,7 @@ static double __pyx_f_11obliquetree_3src_6metric_calculate_impurity(int const __
|
|
|
23650
23671
|
*/
|
|
23651
23672
|
__pyx_v_impurity_c = __pyx_f_11obliquetree_3src_6metric_find_best_split_for_feature_multiclass(__pyx_v_sort_buffer, __pyx_v_sample_weight, __pyx_v_y, __pyx_v_nan_indices, __pyx_v_n_samples, __pyx_v_n_nans, __pyx_v_min_samples_leaf, __pyx_v_n_classes, __pyx_v_threshold_c, __pyx_v_left_count_c, __pyx_v_missing_go_left);
|
|
23652
23673
|
|
|
23653
|
-
/* "obliquetree/src/metric.pyx":
|
|
23674
|
+
/* "obliquetree/src/metric.pyx":1079
|
|
23654
23675
|
*
|
|
23655
23676
|
* else:
|
|
23656
23677
|
* if n_classes > 2: # <<<<<<<<<<<<<<
|
|
@@ -23660,7 +23681,7 @@ static double __pyx_f_11obliquetree_3src_6metric_calculate_impurity(int const __
|
|
|
23660
23681
|
goto __pyx_L5;
|
|
23661
23682
|
}
|
|
23662
23683
|
|
|
23663
|
-
/* "obliquetree/src/metric.pyx":
|
|
23684
|
+
/* "obliquetree/src/metric.pyx":1095
|
|
23664
23685
|
*
|
|
23665
23686
|
* else:
|
|
23666
23687
|
* impurity_c = find_best_split_for_feature( # <<<<<<<<<<<<<<
|
|
@@ -23669,7 +23690,7 @@ static double __pyx_f_11obliquetree_3src_6metric_calculate_impurity(int const __
|
|
|
23669
23690
|
*/
|
|
23670
23691
|
/*else*/ {
|
|
23671
23692
|
|
|
23672
|
-
/* "obliquetree/src/metric.pyx":
|
|
23693
|
+
/* "obliquetree/src/metric.pyx":1106
|
|
23673
23694
|
* threshold_c,
|
|
23674
23695
|
* left_count_c,
|
|
23675
23696
|
* missing_go_left, # <<<<<<<<<<<<<<
|
|
@@ -23682,7 +23703,7 @@ static double __pyx_f_11obliquetree_3src_6metric_calculate_impurity(int const __
|
|
|
23682
23703
|
}
|
|
23683
23704
|
__pyx_L3:;
|
|
23684
23705
|
|
|
23685
|
-
/* "obliquetree/src/metric.pyx":
|
|
23706
|
+
/* "obliquetree/src/metric.pyx":1108
|
|
23686
23707
|
* missing_go_left,
|
|
23687
23708
|
* )
|
|
23688
23709
|
* return impurity_c # <<<<<<<<<<<<<<
|
|
@@ -23690,7 +23711,7 @@ static double __pyx_f_11obliquetree_3src_6metric_calculate_impurity(int const __
|
|
|
23690
23711
|
__pyx_r = __pyx_v_impurity_c;
|
|
23691
23712
|
goto __pyx_L0;
|
|
23692
23713
|
|
|
23693
|
-
/* "obliquetree/src/metric.pyx":
|
|
23714
|
+
/* "obliquetree/src/metric.pyx":1026
|
|
23694
23715
|
*
|
|
23695
23716
|
*
|
|
23696
23717
|
* cdef double calculate_impurity( # <<<<<<<<<<<<<<
|
|
@@ -24683,35 +24704,35 @@ static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) {
|
|
|
24683
24704
|
#else
|
|
24684
24705
|
#warning "The buffer protocol is not supported in the Limited C-API < 3.11."
|
|
24685
24706
|
#endif
|
|
24686
|
-
if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type___pyx_array_spec, __pyx_mstate->__pyx_array_type) < 0) __PYX_ERR(1, 110, __pyx_L1_error)
|
|
24707
|
+
if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type___pyx_array_spec, __pyx_mstate->__pyx_array_type) < (0)) __PYX_ERR(1, 110, __pyx_L1_error)
|
|
24687
24708
|
#else
|
|
24688
24709
|
__pyx_mstate->__pyx_array_type = &__pyx_type___pyx_array;
|
|
24689
24710
|
#endif
|
|
24690
24711
|
#if !CYTHON_COMPILING_IN_LIMITED_API
|
|
24691
24712
|
#endif
|
|
24692
24713
|
#if !CYTHON_USE_TYPE_SPECS
|
|
24693
|
-
if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_array_type) < 0) __PYX_ERR(1, 110, __pyx_L1_error)
|
|
24714
|
+
if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_array_type) < (0)) __PYX_ERR(1, 110, __pyx_L1_error)
|
|
24694
24715
|
#endif
|
|
24695
|
-
if (__Pyx_SetVtable(__pyx_mstate->__pyx_array_type, __pyx_vtabptr_array) < 0) __PYX_ERR(1, 110, __pyx_L1_error)
|
|
24696
|
-
if (__Pyx_MergeVtables(__pyx_mstate->__pyx_array_type) < 0) __PYX_ERR(1, 110, __pyx_L1_error)
|
|
24697
|
-
if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_array_type) < 0) __PYX_ERR(1, 110, __pyx_L1_error)
|
|
24716
|
+
if (__Pyx_SetVtable(__pyx_mstate->__pyx_array_type, __pyx_vtabptr_array) < (0)) __PYX_ERR(1, 110, __pyx_L1_error)
|
|
24717
|
+
if (__Pyx_MergeVtables(__pyx_mstate->__pyx_array_type) < (0)) __PYX_ERR(1, 110, __pyx_L1_error)
|
|
24718
|
+
if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_array_type) < (0)) __PYX_ERR(1, 110, __pyx_L1_error)
|
|
24698
24719
|
#if CYTHON_USE_TYPE_SPECS
|
|
24699
24720
|
__pyx_mstate->__pyx_MemviewEnum_type = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type___pyx_MemviewEnum_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_MemviewEnum_type)) __PYX_ERR(1, 299, __pyx_L1_error)
|
|
24700
|
-
if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type___pyx_MemviewEnum_spec, __pyx_mstate->__pyx_MemviewEnum_type) < 0) __PYX_ERR(1, 299, __pyx_L1_error)
|
|
24721
|
+
if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type___pyx_MemviewEnum_spec, __pyx_mstate->__pyx_MemviewEnum_type) < (0)) __PYX_ERR(1, 299, __pyx_L1_error)
|
|
24701
24722
|
#else
|
|
24702
24723
|
__pyx_mstate->__pyx_MemviewEnum_type = &__pyx_type___pyx_MemviewEnum;
|
|
24703
24724
|
#endif
|
|
24704
24725
|
#if !CYTHON_COMPILING_IN_LIMITED_API
|
|
24705
24726
|
#endif
|
|
24706
24727
|
#if !CYTHON_USE_TYPE_SPECS
|
|
24707
|
-
if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_MemviewEnum_type) < 0) __PYX_ERR(1, 299, __pyx_L1_error)
|
|
24728
|
+
if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_MemviewEnum_type) < (0)) __PYX_ERR(1, 299, __pyx_L1_error)
|
|
24708
24729
|
#endif
|
|
24709
24730
|
#if !CYTHON_COMPILING_IN_LIMITED_API
|
|
24710
24731
|
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_MemviewEnum_type->tp_dictoffset && __pyx_mstate->__pyx_MemviewEnum_type->tp_getattro == PyObject_GenericGetAttr)) {
|
|
24711
24732
|
__pyx_mstate->__pyx_MemviewEnum_type->tp_getattro = PyObject_GenericGetAttr;
|
|
24712
24733
|
}
|
|
24713
24734
|
#endif
|
|
24714
|
-
if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_MemviewEnum_type) < 0) __PYX_ERR(1, 299, __pyx_L1_error)
|
|
24735
|
+
if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_MemviewEnum_type) < (0)) __PYX_ERR(1, 299, __pyx_L1_error)
|
|
24715
24736
|
__pyx_vtabptr_memoryview = &__pyx_vtable_memoryview;
|
|
24716
24737
|
__pyx_vtable_memoryview.get_item_pointer = (char *(*)(struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_get_item_pointer;
|
|
24717
24738
|
__pyx_vtable_memoryview.is_slice = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_is_slice;
|
|
@@ -24735,23 +24756,23 @@ static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) {
|
|
|
24735
24756
|
#else
|
|
24736
24757
|
#warning "The buffer protocol is not supported in the Limited C-API < 3.11."
|
|
24737
24758
|
#endif
|
|
24738
|
-
if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type___pyx_memoryview_spec, __pyx_mstate->__pyx_memoryview_type) < 0) __PYX_ERR(1, 334, __pyx_L1_error)
|
|
24759
|
+
if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type___pyx_memoryview_spec, __pyx_mstate->__pyx_memoryview_type) < (0)) __PYX_ERR(1, 334, __pyx_L1_error)
|
|
24739
24760
|
#else
|
|
24740
24761
|
__pyx_mstate->__pyx_memoryview_type = &__pyx_type___pyx_memoryview;
|
|
24741
24762
|
#endif
|
|
24742
24763
|
#if !CYTHON_COMPILING_IN_LIMITED_API
|
|
24743
24764
|
#endif
|
|
24744
24765
|
#if !CYTHON_USE_TYPE_SPECS
|
|
24745
|
-
if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_memoryview_type) < 0) __PYX_ERR(1, 334, __pyx_L1_error)
|
|
24766
|
+
if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_memoryview_type) < (0)) __PYX_ERR(1, 334, __pyx_L1_error)
|
|
24746
24767
|
#endif
|
|
24747
24768
|
#if !CYTHON_COMPILING_IN_LIMITED_API
|
|
24748
24769
|
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_memoryview_type->tp_dictoffset && __pyx_mstate->__pyx_memoryview_type->tp_getattro == PyObject_GenericGetAttr)) {
|
|
24749
24770
|
__pyx_mstate->__pyx_memoryview_type->tp_getattro = PyObject_GenericGetAttr;
|
|
24750
24771
|
}
|
|
24751
24772
|
#endif
|
|
24752
|
-
if (__Pyx_SetVtable(__pyx_mstate->__pyx_memoryview_type, __pyx_vtabptr_memoryview) < 0) __PYX_ERR(1, 334, __pyx_L1_error)
|
|
24753
|
-
if (__Pyx_MergeVtables(__pyx_mstate->__pyx_memoryview_type) < 0) __PYX_ERR(1, 334, __pyx_L1_error)
|
|
24754
|
-
if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_memoryview_type) < 0) __PYX_ERR(1, 334, __pyx_L1_error)
|
|
24773
|
+
if (__Pyx_SetVtable(__pyx_mstate->__pyx_memoryview_type, __pyx_vtabptr_memoryview) < (0)) __PYX_ERR(1, 334, __pyx_L1_error)
|
|
24774
|
+
if (__Pyx_MergeVtables(__pyx_mstate->__pyx_memoryview_type) < (0)) __PYX_ERR(1, 334, __pyx_L1_error)
|
|
24775
|
+
if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_memoryview_type) < (0)) __PYX_ERR(1, 334, __pyx_L1_error)
|
|
24755
24776
|
__pyx_vtabptr__memoryviewslice = &__pyx_vtable__memoryviewslice;
|
|
24756
24777
|
__pyx_vtable__memoryviewslice.__pyx_base = *__pyx_vtabptr_memoryview;
|
|
24757
24778
|
__pyx_vtable__memoryviewslice.__pyx_base.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryviewslice_convert_item_to_object;
|
|
@@ -24763,7 +24784,7 @@ static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) {
|
|
|
24763
24784
|
__pyx_mstate->__pyx_memoryviewslice_type = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type___pyx_memoryviewslice_spec, __pyx_t_1);
|
|
24764
24785
|
__Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
24765
24786
|
if (unlikely(!__pyx_mstate->__pyx_memoryviewslice_type)) __PYX_ERR(1, 950, __pyx_L1_error)
|
|
24766
|
-
if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type___pyx_memoryviewslice_spec, __pyx_mstate->__pyx_memoryviewslice_type) < 0) __PYX_ERR(1, 950, __pyx_L1_error)
|
|
24787
|
+
if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type___pyx_memoryviewslice_spec, __pyx_mstate->__pyx_memoryviewslice_type) < (0)) __PYX_ERR(1, 950, __pyx_L1_error)
|
|
24767
24788
|
#else
|
|
24768
24789
|
__pyx_mstate->__pyx_memoryviewslice_type = &__pyx_type___pyx_memoryviewslice;
|
|
24769
24790
|
#endif
|
|
@@ -24771,16 +24792,16 @@ static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) {
|
|
|
24771
24792
|
__pyx_mstate_global->__pyx_memoryviewslice_type->tp_base = __pyx_mstate_global->__pyx_memoryview_type;
|
|
24772
24793
|
#endif
|
|
24773
24794
|
#if !CYTHON_USE_TYPE_SPECS
|
|
24774
|
-
if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_memoryviewslice_type) < 0) __PYX_ERR(1, 950, __pyx_L1_error)
|
|
24795
|
+
if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_memoryviewslice_type) < (0)) __PYX_ERR(1, 950, __pyx_L1_error)
|
|
24775
24796
|
#endif
|
|
24776
24797
|
#if !CYTHON_COMPILING_IN_LIMITED_API
|
|
24777
24798
|
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_memoryviewslice_type->tp_dictoffset && __pyx_mstate->__pyx_memoryviewslice_type->tp_getattro == PyObject_GenericGetAttr)) {
|
|
24778
24799
|
__pyx_mstate->__pyx_memoryviewslice_type->tp_getattro = PyObject_GenericGetAttr;
|
|
24779
24800
|
}
|
|
24780
24801
|
#endif
|
|
24781
|
-
if (__Pyx_SetVtable(__pyx_mstate->__pyx_memoryviewslice_type, __pyx_vtabptr__memoryviewslice) < 0) __PYX_ERR(1, 950, __pyx_L1_error)
|
|
24782
|
-
if (__Pyx_MergeVtables(__pyx_mstate->__pyx_memoryviewslice_type) < 0) __PYX_ERR(1, 950, __pyx_L1_error)
|
|
24783
|
-
if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_memoryviewslice_type) < 0) __PYX_ERR(1, 950, __pyx_L1_error)
|
|
24802
|
+
if (__Pyx_SetVtable(__pyx_mstate->__pyx_memoryviewslice_type, __pyx_vtabptr__memoryviewslice) < (0)) __PYX_ERR(1, 950, __pyx_L1_error)
|
|
24803
|
+
if (__Pyx_MergeVtables(__pyx_mstate->__pyx_memoryviewslice_type) < (0)) __PYX_ERR(1, 950, __pyx_L1_error)
|
|
24804
|
+
if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_memoryviewslice_type) < (0)) __PYX_ERR(1, 950, __pyx_L1_error)
|
|
24784
24805
|
__Pyx_RefNannyFinishContext();
|
|
24785
24806
|
return 0;
|
|
24786
24807
|
__pyx_L1_error:;
|
|
@@ -24800,15 +24821,15 @@ static int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate) {
|
|
|
24800
24821
|
/*--- Type import code ---*/
|
|
24801
24822
|
__pyx_t_1 = PyImport_ImportModule("obliquetree.src.base"); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4, __pyx_L1_error)
|
|
24802
24823
|
__Pyx_GOTREF(__pyx_t_1);
|
|
24803
|
-
__pyx_mstate->__pyx_ptype_11obliquetree_3src_4base_TreeClassifier =
|
|
24824
|
+
__pyx_mstate->__pyx_ptype_11obliquetree_3src_4base_TreeClassifier = __Pyx_ImportType_3_1_6(__pyx_t_1, "obliquetree.src.base", "TreeClassifier",
|
|
24804
24825
|
#if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
|
|
24805
|
-
sizeof(struct __pyx_obj_11obliquetree_3src_4base_TreeClassifier),
|
|
24826
|
+
sizeof(struct __pyx_obj_11obliquetree_3src_4base_TreeClassifier), __PYX_GET_STRUCT_ALIGNMENT_3_1_6(struct __pyx_obj_11obliquetree_3src_4base_TreeClassifier),
|
|
24806
24827
|
#elif CYTHON_COMPILING_IN_LIMITED_API
|
|
24807
|
-
sizeof(struct __pyx_obj_11obliquetree_3src_4base_TreeClassifier),
|
|
24828
|
+
sizeof(struct __pyx_obj_11obliquetree_3src_4base_TreeClassifier), __PYX_GET_STRUCT_ALIGNMENT_3_1_6(struct __pyx_obj_11obliquetree_3src_4base_TreeClassifier),
|
|
24808
24829
|
#else
|
|
24809
|
-
sizeof(struct __pyx_obj_11obliquetree_3src_4base_TreeClassifier),
|
|
24830
|
+
sizeof(struct __pyx_obj_11obliquetree_3src_4base_TreeClassifier), __PYX_GET_STRUCT_ALIGNMENT_3_1_6(struct __pyx_obj_11obliquetree_3src_4base_TreeClassifier),
|
|
24810
24831
|
#endif
|
|
24811
|
-
|
|
24832
|
+
__Pyx_ImportType_CheckSize_Warn_3_1_6); if (!__pyx_mstate->__pyx_ptype_11obliquetree_3src_4base_TreeClassifier) __PYX_ERR(2, 4, __pyx_L1_error)
|
|
24812
24833
|
__pyx_vtabptr_11obliquetree_3src_4base_TreeClassifier = (struct __pyx_vtabstruct_11obliquetree_3src_4base_TreeClassifier*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_11obliquetree_3src_4base_TreeClassifier); if (unlikely(!__pyx_vtabptr_11obliquetree_3src_4base_TreeClassifier)) __PYX_ERR(2, 4, __pyx_L1_error)
|
|
24813
24834
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
24814
24835
|
__Pyx_RefNannyFinishContext();
|
|
@@ -24839,9 +24860,9 @@ static int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate) {
|
|
|
24839
24860
|
/*--- Function import code ---*/
|
|
24840
24861
|
__pyx_t_1 = PyImport_ImportModule("obliquetree.src.utils"); if (!__pyx_t_1) __PYX_ERR(0, 1, __pyx_L1_error)
|
|
24841
24862
|
__Pyx_GOTREF(__pyx_t_1);
|
|
24842
|
-
if (
|
|
24843
|
-
if (
|
|
24844
|
-
if (
|
|
24863
|
+
if (__Pyx_ImportFunction_3_1_6(__pyx_t_1, "sort_category_stats", (void (**)(void))&__pyx_f_11obliquetree_3src_5utils_sort_category_stats, "void (struct __pyx_t_11obliquetree_3src_4tree_CategoryStat *, int const )") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
|
|
24864
|
+
if (__Pyx_ImportFunction_3_1_6(__pyx_t_1, "sort_category_stats_multiclass", (void (**)(void))&__pyx_f_11obliquetree_3src_5utils_sort_category_stats_multiclass, "void (struct __pyx_t_11obliquetree_3src_4tree_CategoryStat *, int const *, int const , int const )") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
|
|
24865
|
+
if (__Pyx_ImportFunction_3_1_6(__pyx_t_1, "generate_permutations", (void (**)(void))&__pyx_f_11obliquetree_3src_5utils_generate_permutations, "int **(int const , int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
|
|
24845
24866
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
24846
24867
|
__Pyx_RefNannyFinishContext();
|
|
24847
24868
|
return 0;
|
|
@@ -25086,7 +25107,7 @@ if (!__Pyx_RefNanny) {
|
|
|
25086
25107
|
#endif
|
|
25087
25108
|
|
|
25088
25109
|
__Pyx_RefNannySetupContext("PyInit_metric", 0);
|
|
25089
|
-
if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
|
|
25110
|
+
if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
|
|
25090
25111
|
#ifdef __Pxy_PyFrame_Initialize_Offsets
|
|
25091
25112
|
__Pxy_PyFrame_Initialize_Offsets();
|
|
25092
25113
|
#endif
|
|
@@ -25094,30 +25115,30 @@ __Pyx_RefNannySetupContext("PyInit_metric", 0);
|
|
|
25094
25115
|
__pyx_mstate->__pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
|
|
25095
25116
|
__pyx_mstate->__pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
|
|
25096
25117
|
/*--- Initialize various global constants etc. ---*/
|
|
25097
|
-
if (__Pyx_InitConstants(__pyx_mstate) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
|
|
25118
|
+
if (__Pyx_InitConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
|
|
25098
25119
|
stringtab_initialized = 1;
|
|
25099
|
-
if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
|
|
25120
|
+
if (__Pyx_InitGlobals() < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
|
|
25100
25121
|
#if 0 || defined(__Pyx_CyFunction_USED) || defined(__Pyx_FusedFunction_USED) || defined(__Pyx_Coroutine_USED) || defined(__Pyx_Generator_USED) || defined(__Pyx_AsyncGen_USED)
|
|
25101
|
-
if (__pyx_CommonTypesMetaclass_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
|
|
25122
|
+
if (__pyx_CommonTypesMetaclass_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
|
|
25102
25123
|
#endif
|
|
25103
25124
|
#ifdef __Pyx_CyFunction_USED
|
|
25104
|
-
if (__pyx_CyFunction_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
|
|
25125
|
+
if (__pyx_CyFunction_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
|
|
25105
25126
|
#endif
|
|
25106
25127
|
#ifdef __Pyx_FusedFunction_USED
|
|
25107
|
-
if (__pyx_FusedFunction_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
|
|
25128
|
+
if (__pyx_FusedFunction_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
|
|
25108
25129
|
#endif
|
|
25109
25130
|
#ifdef __Pyx_Coroutine_USED
|
|
25110
|
-
if (__pyx_Coroutine_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
|
|
25131
|
+
if (__pyx_Coroutine_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
|
|
25111
25132
|
#endif
|
|
25112
25133
|
#ifdef __Pyx_Generator_USED
|
|
25113
|
-
if (__pyx_Generator_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
|
|
25134
|
+
if (__pyx_Generator_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
|
|
25114
25135
|
#endif
|
|
25115
25136
|
#ifdef __Pyx_AsyncGen_USED
|
|
25116
|
-
if (__pyx_AsyncGen_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
|
|
25137
|
+
if (__pyx_AsyncGen_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
|
|
25117
25138
|
#endif
|
|
25118
25139
|
/*--- Library function declarations ---*/
|
|
25119
25140
|
if (__pyx_module_is_main_obliquetree__src__metric) {
|
|
25120
|
-
if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_name_2, __pyx_mstate_global->__pyx_n_u_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
|
|
25141
|
+
if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_name_2, __pyx_mstate_global->__pyx_n_u_main) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
|
|
25121
25142
|
}
|
|
25122
25143
|
{
|
|
25123
25144
|
PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
|
|
@@ -25126,10 +25147,10 @@ __Pyx_RefNannySetupContext("PyInit_metric", 0);
|
|
|
25126
25147
|
}
|
|
25127
25148
|
}
|
|
25128
25149
|
/*--- Builtin init code ---*/
|
|
25129
|
-
if (__Pyx_InitCachedBuiltins(__pyx_mstate) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
|
|
25150
|
+
if (__Pyx_InitCachedBuiltins(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
|
|
25130
25151
|
/*--- Constants init code ---*/
|
|
25131
|
-
if (__Pyx_InitCachedConstants(__pyx_mstate) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
|
|
25132
|
-
if (__Pyx_CreateCodeObjects(__pyx_mstate) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
|
|
25152
|
+
if (__Pyx_InitCachedConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
|
|
25153
|
+
if (__Pyx_CreateCodeObjects(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
|
|
25133
25154
|
/*--- Global type/function init code ---*/
|
|
25134
25155
|
(void)__Pyx_modinit_global_init_code(__pyx_mstate);
|
|
25135
25156
|
(void)__Pyx_modinit_variable_export_code(__pyx_mstate);
|
|
@@ -25280,7 +25301,7 @@ __Pyx_RefNannySetupContext("PyInit_metric", 0);
|
|
|
25280
25301
|
*/
|
|
25281
25302
|
__pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_collections_abc_Sequence, __pyx_mstate_global->__pyx_n_u_count); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 240, __pyx_L10_error)
|
|
25282
25303
|
__Pyx_GOTREF(__pyx_t_5);
|
|
25283
|
-
if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_array_type, __pyx_mstate_global->__pyx_n_u_count, __pyx_t_5) < 0) __PYX_ERR(1, 240, __pyx_L10_error)
|
|
25304
|
+
if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_array_type, __pyx_mstate_global->__pyx_n_u_count, __pyx_t_5) < (0)) __PYX_ERR(1, 240, __pyx_L10_error)
|
|
25284
25305
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
25285
25306
|
|
|
25286
25307
|
/* "View.MemoryView":241
|
|
@@ -25292,7 +25313,7 @@ __Pyx_RefNannySetupContext("PyInit_metric", 0);
|
|
|
25292
25313
|
*/
|
|
25293
25314
|
__pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_collections_abc_Sequence, __pyx_mstate_global->__pyx_n_u_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 241, __pyx_L10_error)
|
|
25294
25315
|
__Pyx_GOTREF(__pyx_t_5);
|
|
25295
|
-
if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_array_type, __pyx_mstate_global->__pyx_n_u_index, __pyx_t_5) < 0) __PYX_ERR(1, 241, __pyx_L10_error)
|
|
25316
|
+
if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_array_type, __pyx_mstate_global->__pyx_n_u_index, __pyx_t_5) < (0)) __PYX_ERR(1, 241, __pyx_L10_error)
|
|
25296
25317
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
25297
25318
|
|
|
25298
25319
|
/* "View.MemoryView":239
|
|
@@ -25502,7 +25523,7 @@ __Pyx_RefNannySetupContext("PyInit_metric", 0);
|
|
|
25502
25523
|
*/
|
|
25503
25524
|
__pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_collections_abc_Sequence, __pyx_mstate_global->__pyx_n_u_count); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 983, __pyx_L18_error)
|
|
25504
25525
|
__Pyx_GOTREF(__pyx_t_5);
|
|
25505
|
-
if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_memoryviewslice_type, __pyx_mstate_global->__pyx_n_u_count, __pyx_t_5) < 0) __PYX_ERR(1, 983, __pyx_L18_error)
|
|
25526
|
+
if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_memoryviewslice_type, __pyx_mstate_global->__pyx_n_u_count, __pyx_t_5) < (0)) __PYX_ERR(1, 983, __pyx_L18_error)
|
|
25506
25527
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
25507
25528
|
|
|
25508
25529
|
/* "View.MemoryView":984
|
|
@@ -25514,7 +25535,7 @@ __Pyx_RefNannySetupContext("PyInit_metric", 0);
|
|
|
25514
25535
|
*/
|
|
25515
25536
|
__pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_collections_abc_Sequence, __pyx_mstate_global->__pyx_n_u_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 984, __pyx_L18_error)
|
|
25516
25537
|
__Pyx_GOTREF(__pyx_t_5);
|
|
25517
|
-
if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_memoryviewslice_type, __pyx_mstate_global->__pyx_n_u_index, __pyx_t_5) < 0) __PYX_ERR(1, 984, __pyx_L18_error)
|
|
25538
|
+
if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_memoryviewslice_type, __pyx_mstate_global->__pyx_n_u_index, __pyx_t_5) < (0)) __PYX_ERR(1, 984, __pyx_L18_error)
|
|
25518
25539
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
25519
25540
|
|
|
25520
25541
|
/* "View.MemoryView":982
|
|
@@ -25669,7 +25690,7 @@ __Pyx_RefNannySetupContext("PyInit_metric", 0);
|
|
|
25669
25690
|
*/
|
|
25670
25691
|
__pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_15View_dot_MemoryView_1__pyx_unpickle_Enum, NULL, __pyx_mstate_global->__pyx_n_u_View_MemoryView); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1, __pyx_L1_error)
|
|
25671
25692
|
__Pyx_GOTREF(__pyx_t_5);
|
|
25672
|
-
if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_Enum, __pyx_t_5) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
|
|
25693
|
+
if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_Enum, __pyx_t_5) < (0)) __PYX_ERR(1, 1, __pyx_L1_error)
|
|
25673
25694
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
25674
25695
|
|
|
25675
25696
|
/* "obliquetree/src/metric.pyx":1
|
|
@@ -25679,7 +25700,7 @@ __Pyx_RefNannySetupContext("PyInit_metric", 0);
|
|
|
25679
25700
|
*/
|
|
25680
25701
|
__pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1, __pyx_L1_error)
|
|
25681
25702
|
__Pyx_GOTREF(__pyx_t_5);
|
|
25682
|
-
if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test, __pyx_t_5) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
|
|
25703
|
+
if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test, __pyx_t_5) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
|
|
25683
25704
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
25684
25705
|
|
|
25685
25706
|
/*--- Wrapped vars code ---*/
|
|
@@ -26165,7 +26186,7 @@ __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n)
|
|
|
26165
26186
|
res = PyTuple_New(n);
|
|
26166
26187
|
if (unlikely(res == NULL)) return NULL;
|
|
26167
26188
|
for (i = 0; i < n; i++) {
|
|
26168
|
-
if (unlikely(__Pyx_PyTuple_SET_ITEM(res, i, src[i]) < 0)) {
|
|
26189
|
+
if (unlikely(__Pyx_PyTuple_SET_ITEM(res, i, src[i]) < (0))) {
|
|
26169
26190
|
Py_DECREF(res);
|
|
26170
26191
|
return NULL;
|
|
26171
26192
|
}
|
|
@@ -28903,6 +28924,7 @@ static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject
|
|
|
28903
28924
|
changed = 1;
|
|
28904
28925
|
}
|
|
28905
28926
|
#endif // CYTHON_METH_FASTCALL
|
|
28927
|
+
#if !CYTHON_COMPILING_IN_PYPY
|
|
28906
28928
|
else if (strcmp(memb->name, "__module__") == 0) {
|
|
28907
28929
|
PyObject *descr;
|
|
28908
28930
|
assert(memb->type == T_OBJECT);
|
|
@@ -28917,11 +28939,13 @@ static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject
|
|
|
28917
28939
|
}
|
|
28918
28940
|
changed = 1;
|
|
28919
28941
|
}
|
|
28942
|
+
#endif // !CYTHON_COMPILING_IN_PYPY
|
|
28920
28943
|
}
|
|
28921
28944
|
memb++;
|
|
28922
28945
|
}
|
|
28923
28946
|
}
|
|
28924
28947
|
#endif // !CYTHON_COMPILING_IN_LIMITED_API
|
|
28948
|
+
#if !CYTHON_COMPILING_IN_PYPY
|
|
28925
28949
|
slot = spec->slots;
|
|
28926
28950
|
while (slot && slot->slot && slot->slot != Py_tp_getset)
|
|
28927
28951
|
slot++;
|
|
@@ -28953,6 +28977,7 @@ static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject
|
|
|
28953
28977
|
++getset;
|
|
28954
28978
|
}
|
|
28955
28979
|
}
|
|
28980
|
+
#endif // !CYTHON_COMPILING_IN_PYPY
|
|
28956
28981
|
if (changed)
|
|
28957
28982
|
PyType_Modified(type);
|
|
28958
28983
|
#endif // PY_VERSION_HEX > 0x030900B1
|
|
@@ -29057,6 +29082,13 @@ try_unpack:
|
|
|
29057
29082
|
|
|
29058
29083
|
/* PyObjectCallMethod0 */
|
|
29059
29084
|
static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) {
|
|
29085
|
+
#if CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))
|
|
29086
|
+
PyObject *args[1] = {obj};
|
|
29087
|
+
(void) __Pyx_PyObject_GetMethod;
|
|
29088
|
+
(void) __Pyx_PyObject_CallOneArg;
|
|
29089
|
+
(void) __Pyx_PyObject_CallNoArg;
|
|
29090
|
+
return PyObject_VectorcallMethod(method_name, args, 1 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL);
|
|
29091
|
+
#else
|
|
29060
29092
|
PyObject *method = NULL, *result = NULL;
|
|
29061
29093
|
int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
|
|
29062
29094
|
if (likely(is_method)) {
|
|
@@ -29069,6 +29101,7 @@ static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name
|
|
|
29069
29101
|
Py_DECREF(method);
|
|
29070
29102
|
bad:
|
|
29071
29103
|
return result;
|
|
29104
|
+
#endif
|
|
29072
29105
|
}
|
|
29073
29106
|
|
|
29074
29107
|
/* ValidateBasesTuple */
|
|
@@ -29498,15 +29531,15 @@ __PYX_GOOD:
|
|
|
29498
29531
|
}
|
|
29499
29532
|
|
|
29500
29533
|
/* TypeImport */
|
|
29501
|
-
#ifndef
|
|
29502
|
-
#define
|
|
29503
|
-
static PyTypeObject *
|
|
29504
|
-
size_t size, size_t alignment, enum
|
|
29534
|
+
#ifndef __PYX_HAVE_RT_ImportType_3_1_6
|
|
29535
|
+
#define __PYX_HAVE_RT_ImportType_3_1_6
|
|
29536
|
+
static PyTypeObject *__Pyx_ImportType_3_1_6(PyObject *module, const char *module_name, const char *class_name,
|
|
29537
|
+
size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_1_6 check_size)
|
|
29505
29538
|
{
|
|
29506
29539
|
PyObject *result = 0;
|
|
29507
29540
|
Py_ssize_t basicsize;
|
|
29508
29541
|
Py_ssize_t itemsize;
|
|
29509
|
-
#if CYTHON_COMPILING_IN_LIMITED_API
|
|
29542
|
+
#if defined(Py_LIMITED_API) || (defined(CYTHON_COMPILING_IN_LIMITED_API) && CYTHON_COMPILING_IN_LIMITED_API)
|
|
29510
29543
|
PyObject *py_basicsize;
|
|
29511
29544
|
PyObject *py_itemsize;
|
|
29512
29545
|
#endif
|
|
@@ -29519,7 +29552,7 @@ static PyTypeObject *__Pyx_ImportType_3_1_2(PyObject *module, const char *module
|
|
|
29519
29552
|
module_name, class_name);
|
|
29520
29553
|
goto bad;
|
|
29521
29554
|
}
|
|
29522
|
-
#if !CYTHON_COMPILING_IN_LIMITED_API
|
|
29555
|
+
#if !( defined(Py_LIMITED_API) || (defined(CYTHON_COMPILING_IN_LIMITED_API) && CYTHON_COMPILING_IN_LIMITED_API) )
|
|
29523
29556
|
basicsize = ((PyTypeObject *)result)->tp_basicsize;
|
|
29524
29557
|
itemsize = ((PyTypeObject *)result)->tp_itemsize;
|
|
29525
29558
|
#else
|
|
@@ -29557,7 +29590,7 @@ static PyTypeObject *__Pyx_ImportType_3_1_2(PyObject *module, const char *module
|
|
|
29557
29590
|
module_name, class_name, size, basicsize+itemsize);
|
|
29558
29591
|
goto bad;
|
|
29559
29592
|
}
|
|
29560
|
-
if (check_size ==
|
|
29593
|
+
if (check_size == __Pyx_ImportType_CheckSize_Error_3_1_6 &&
|
|
29561
29594
|
((size_t)basicsize > size || (size_t)(basicsize + itemsize) < size)) {
|
|
29562
29595
|
PyErr_Format(PyExc_ValueError,
|
|
29563
29596
|
"%.200s.%.200s size changed, may indicate binary incompatibility. "
|
|
@@ -29565,7 +29598,7 @@ static PyTypeObject *__Pyx_ImportType_3_1_2(PyObject *module, const char *module
|
|
|
29565
29598
|
module_name, class_name, size, basicsize, basicsize+itemsize);
|
|
29566
29599
|
goto bad;
|
|
29567
29600
|
}
|
|
29568
|
-
else if (check_size ==
|
|
29601
|
+
else if (check_size == __Pyx_ImportType_CheckSize_Warn_3_1_6 && (size_t)basicsize > size) {
|
|
29569
29602
|
if (PyErr_WarnFormat(NULL, 0,
|
|
29570
29603
|
"%.200s.%.200s size changed, may indicate binary incompatibility. "
|
|
29571
29604
|
"Expected %zd from C header, got %zd from PyObject",
|
|
@@ -31232,9 +31265,9 @@ bad:
|
|
|
31232
31265
|
}
|
|
31233
31266
|
|
|
31234
31267
|
/* FunctionImport */
|
|
31235
|
-
#ifndef
|
|
31236
|
-
#define
|
|
31237
|
-
static int
|
|
31268
|
+
#ifndef __PYX_HAVE_RT_ImportFunction_3_1_6
|
|
31269
|
+
#define __PYX_HAVE_RT_ImportFunction_3_1_6
|
|
31270
|
+
static int __Pyx_ImportFunction_3_1_6(PyObject *module, const char *funcname, void (**f)(void), const char *sig) {
|
|
31238
31271
|
PyObject *d = 0;
|
|
31239
31272
|
PyObject *cobj = 0;
|
|
31240
31273
|
union {
|
|
@@ -31526,6 +31559,17 @@ static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
|
|
|
31526
31559
|
static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t ival) {
|
|
31527
31560
|
return PyLong_FromSize_t(ival);
|
|
31528
31561
|
}
|
|
31562
|
+
#if CYTHON_USE_PYLONG_INTERNALS
|
|
31563
|
+
static CYTHON_INLINE int __Pyx_PyLong_CompactAsLong(PyObject *x, long *return_value) {
|
|
31564
|
+
if (unlikely(!__Pyx_PyLong_IsCompact(x)))
|
|
31565
|
+
return 0;
|
|
31566
|
+
Py_ssize_t value = __Pyx_PyLong_CompactValue(x);
|
|
31567
|
+
if ((sizeof(long) < sizeof(Py_ssize_t)) && unlikely(value != (long) value))
|
|
31568
|
+
return 0;
|
|
31569
|
+
*return_value = (long) value;
|
|
31570
|
+
return 1;
|
|
31571
|
+
}
|
|
31572
|
+
#endif
|
|
31529
31573
|
|
|
31530
31574
|
|
|
31531
31575
|
/* MultiPhaseInitModuleState */
|