From 04eddae9d54e40f8280c8beed0ecbb18ad301bb8 Mon Sep 17 00:00:00 2001 From: Thierry Moudiki Date: Thu, 25 Apr 2024 21:49:54 +0200 Subject: [PATCH] fix building extensions --- CHANGES.md | 2 +- Makefile | 2 +- examples/lsboost_regressor_pi.py | 3 + mlsauce/adaopt/_adaopt.py | 63 ++++--- mlsauce/adaopt/_adaoptc.c | 250 ++++++++++++------------- mlsauce/booster/_booster_classifier.py | 68 ++++--- mlsauce/booster/_booster_regressor.py | 62 +++--- mlsauce/lasso/_lasso.py | 16 +- mlsauce/lasso/_lassoc.c | 250 ++++++++++++------------- mlsauce/ridge/_ridge.py | 41 ++-- mlsauce/ridge/_ridgec.c | 250 ++++++++++++------------- mlsauce/stump/_stump_classifier.py | 10 +- mlsauce/stump/_stumpc.c | 250 ++++++++++++------------- mlsauce/utils/__init__.py | 2 +- mlsauce/utils/get_beta.py | 1 + mlsauce/utils/misc/misc.py | 99 ++++++---- setup.py | 31 +-- 17 files changed, 754 insertions(+), 646 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index cc98111..37a7bbd 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,4 +1,4 @@ -# version 0.13.0 +# version 0.13.1 - add clustering to `LSBoostRegressor`, `LSBoostClassifier`, and `AdaOpt` diff --git a/Makefile b/Makefile index 5138485..c2fbf9c 100644 --- a/Makefile +++ b/Makefile @@ -87,7 +87,7 @@ dist: clean ## builds source and wheel package ls -l dist install: clean ## install the package to the active Python's site-packages - python3 -m pip install . + python3 -m pip install . --verbose run-examples: ## run all examples with one command find examples -maxdepth 2 -name "*.py" -exec python3 {} \; \ No newline at end of file diff --git a/examples/lsboost_regressor_pi.py b/examples/lsboost_regressor_pi.py index c9a61e1..9e97408 100644 --- a/examples/lsboost_regressor_pi.py +++ b/examples/lsboost_regressor_pi.py @@ -4,6 +4,9 @@ print(f"\n ----- Running: {os.path.basename(__file__)}... ----- \n") +print(os.path.dirname( + os.path.abspath(__file__) + )) subprocess.check_call([sys.executable, "-m", "pip", "install", "matplotlib"]) diff --git a/mlsauce/adaopt/_adaopt.py b/mlsauce/adaopt/_adaopt.py index c513788..f04de96 100644 --- a/mlsauce/adaopt/_adaopt.py +++ b/mlsauce/adaopt/_adaopt.py @@ -7,13 +7,15 @@ from numpy.linalg import norm from tqdm import tqdm from ..utils import subsample -from ..utils import cluster +from ..utils import cluster try: from . import _adaoptc as adaoptc except ImportError: - pass + import pyximport + pyximport.install() + import _adaoptc as adaoptc class AdaOpt(BaseEstimator, ClassifierMixin): """AdaOpt classifier. @@ -72,15 +74,15 @@ class AdaOpt(BaseEstimator, ClassifierMixin): cache: boolean if the nearest neighbors are cached or not, for faster retrieval in subsequent calls. - + n_clusters_input: int number of clusters (a priori) for clustering the features - + clustering_method: str clustering method: currently 'kmeans', 'gmm' - + cluster_scaling: str - scaling method for clustering: currently 'standard', 'robust', 'minmax' + scaling method for clustering: currently 'standard', 'robust', 'minmax' seed: int reproducibility seed for nodes_sim=='uniform', clustering and dropout. @@ -104,12 +106,12 @@ def __init__( n_jobs=None, verbose=0, cache=True, - n_clusters_input = 0, - clustering_method = "kmeans", - cluster_scaling = "standard", + n_clusters_input=0, + clustering_method="kmeans", + cluster_scaling="standard", seed=123, ): - if n_clusters_input > 0: + if n_clusters_input > 0: assert clustering_method in ( "kmeans", "gmm", @@ -145,7 +147,7 @@ def __init__( self.n_clusters_input = n_clusters_input self.clustering_method = clustering_method self.cluster_scaling = cluster_scaling - self.scaler_, self.label_encoder_, self.clusterer_ = None, None, None + self.scaler_, self.label_encoder_, self.clusterer_ = None, None, None self.seed = seed def fit(self, X, y, **kwargs): @@ -168,12 +170,17 @@ def fit(self, X, y, **kwargs): """ - if self.n_clusters_input > 0: - clustered_X, self.scaler_, self.label_encoder_, self.clusterer_ = cluster(X, n_clusters=self.n_clusters_input, - method=self.clustering_method, - type_scaling=self.cluster_scaling, - training=True, - seed=self.seed) + if self.n_clusters_input > 0: + clustered_X, self.scaler_, self.label_encoder_, self.clusterer_ = ( + cluster( + X, + n_clusters=self.n_clusters_input, + method=self.clustering_method, + type_scaling=self.cluster_scaling, + training=True, + seed=self.seed, + ) + ) X = np.column_stack((X.copy(), clustered_X)) if self.row_sample < 1: @@ -212,7 +219,7 @@ def fit(self, X, y, **kwargs): self.alphas = res["alphas"] self.n_iterations = res["n_iterations"] self.scaled_X_train = np.array(res["scaled_X_train"], dtype=np.float64) - self.n_classes_ = len(np.unique(y)) # for compatibility with sklearn + self.n_classes_ = len(np.unique(y)) # for compatibility with sklearn return self def predict(self, X, **kwargs): @@ -255,13 +262,19 @@ def predict_proba(self, X, **kwargs): n_train, p_train = self.scaled_X_train.shape if self.n_clusters_input > 0: - X = np.column_stack((X.copy(), cluster( - X, training=False, - scaler=self.scaler_, - label_encoder=self.label_encoder_, - clusterer=self.clusterer_, - seed=self.seed - ))) + X = np.column_stack( + ( + X.copy(), + cluster( + X, + training=False, + scaler=self.scaler_, + label_encoder=self.label_encoder_, + clusterer=self.clusterer_, + seed=self.seed, + ), + ) + ) n_test = X.shape[0] diff --git a/mlsauce/adaopt/_adaoptc.c b/mlsauce/adaopt/_adaoptc.c index 9381e99..2627203 100644 --- a/mlsauce/adaopt/_adaoptc.c +++ b/mlsauce/adaopt/_adaoptc.c @@ -4,14 +4,14 @@ { "distutils": { "depends": [ - "/workspaces/codespaces-blank/mlsauce/venv/lib/python3.10/site-packages/numpy/core/include/numpy/arrayobject.h", - "/workspaces/codespaces-blank/mlsauce/venv/lib/python3.10/site-packages/numpy/core/include/numpy/arrayscalars.h", - "/workspaces/codespaces-blank/mlsauce/venv/lib/python3.10/site-packages/numpy/core/include/numpy/ndarrayobject.h", - "/workspaces/codespaces-blank/mlsauce/venv/lib/python3.10/site-packages/numpy/core/include/numpy/ndarraytypes.h", - "/workspaces/codespaces-blank/mlsauce/venv/lib/python3.10/site-packages/numpy/core/include/numpy/ufuncobject.h" + "/Users/t/Documents/Python_Packages/mlsauce/venv/lib/python3.11/site-packages/numpy/core/include/numpy/arrayobject.h", + "/Users/t/Documents/Python_Packages/mlsauce/venv/lib/python3.11/site-packages/numpy/core/include/numpy/arrayscalars.h", + "/Users/t/Documents/Python_Packages/mlsauce/venv/lib/python3.11/site-packages/numpy/core/include/numpy/ndarrayobject.h", + "/Users/t/Documents/Python_Packages/mlsauce/venv/lib/python3.11/site-packages/numpy/core/include/numpy/ndarraytypes.h", + "/Users/t/Documents/Python_Packages/mlsauce/venv/lib/python3.11/site-packages/numpy/core/include/numpy/ufuncobject.h" ], "include_dirs": [ - "/workspaces/codespaces-blank/mlsauce/venv/lib/python3.10/site-packages/numpy/core/include" + "/Users/t/Documents/Python_Packages/mlsauce/venv/lib/python3.11/site-packages/numpy/core/include" ], "library_dirs": [ "mlsauce/adaopt/" @@ -1532,8 +1532,8 @@ static const char *__pyx_filename; static const char *__pyx_f[] = { "mlsauce/adaopt/_adaoptc.pyx", "", - "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd", - "venv/lib/python3.10/site-packages/Cython/Includes/cpython/type.pxd", + "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd", + "venv/lib/python3.11/site-packages/Cython/Includes/cpython/type.pxd", }; /* #### Code section: utility_code_proto_before_types ### */ /* ForceInitThreads.proto */ @@ -1679,7 +1679,7 @@ typedef struct { /* #### Code section: numeric_typedefs ### */ -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":730 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":730 * # in Cython to enable them only on the right systems. * * ctypedef npy_int8 int8_t # <<<<<<<<<<<<<< @@ -1688,7 +1688,7 @@ typedef struct { */ typedef npy_int8 __pyx_t_5numpy_int8_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":731 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":731 * * ctypedef npy_int8 int8_t * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<< @@ -1697,7 +1697,7 @@ typedef npy_int8 __pyx_t_5numpy_int8_t; */ typedef npy_int16 __pyx_t_5numpy_int16_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":732 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":732 * ctypedef npy_int8 int8_t * ctypedef npy_int16 int16_t * ctypedef npy_int32 int32_t # <<<<<<<<<<<<<< @@ -1706,7 +1706,7 @@ typedef npy_int16 __pyx_t_5numpy_int16_t; */ typedef npy_int32 __pyx_t_5numpy_int32_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":733 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":733 * ctypedef npy_int16 int16_t * ctypedef npy_int32 int32_t * ctypedef npy_int64 int64_t # <<<<<<<<<<<<<< @@ -1715,7 +1715,7 @@ typedef npy_int32 __pyx_t_5numpy_int32_t; */ typedef npy_int64 __pyx_t_5numpy_int64_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":737 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":737 * #ctypedef npy_int128 int128_t * * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<< @@ -1724,7 +1724,7 @@ typedef npy_int64 __pyx_t_5numpy_int64_t; */ typedef npy_uint8 __pyx_t_5numpy_uint8_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":738 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":738 * * ctypedef npy_uint8 uint8_t * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<< @@ -1733,7 +1733,7 @@ typedef npy_uint8 __pyx_t_5numpy_uint8_t; */ typedef npy_uint16 __pyx_t_5numpy_uint16_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":739 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":739 * ctypedef npy_uint8 uint8_t * ctypedef npy_uint16 uint16_t * ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<< @@ -1742,7 +1742,7 @@ typedef npy_uint16 __pyx_t_5numpy_uint16_t; */ typedef npy_uint32 __pyx_t_5numpy_uint32_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":740 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":740 * ctypedef npy_uint16 uint16_t * ctypedef npy_uint32 uint32_t * ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<< @@ -1751,7 +1751,7 @@ typedef npy_uint32 __pyx_t_5numpy_uint32_t; */ typedef npy_uint64 __pyx_t_5numpy_uint64_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":744 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":744 * #ctypedef npy_uint128 uint128_t * * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<< @@ -1760,7 +1760,7 @@ typedef npy_uint64 __pyx_t_5numpy_uint64_t; */ typedef npy_float32 __pyx_t_5numpy_float32_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":745 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":745 * * ctypedef npy_float32 float32_t * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<< @@ -1769,7 +1769,7 @@ typedef npy_float32 __pyx_t_5numpy_float32_t; */ typedef npy_float64 __pyx_t_5numpy_float64_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":754 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":754 * # The int types are mapped a bit surprising -- * # numpy.int corresponds to 'l' and numpy.long to 'q' * ctypedef npy_long int_t # <<<<<<<<<<<<<< @@ -1778,7 +1778,7 @@ typedef npy_float64 __pyx_t_5numpy_float64_t; */ typedef npy_long __pyx_t_5numpy_int_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":755 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":755 * # numpy.int corresponds to 'l' and numpy.long to 'q' * ctypedef npy_long int_t * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<< @@ -1787,7 +1787,7 @@ typedef npy_long __pyx_t_5numpy_int_t; */ typedef npy_longlong __pyx_t_5numpy_longlong_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":757 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":757 * ctypedef npy_longlong longlong_t * * ctypedef npy_ulong uint_t # <<<<<<<<<<<<<< @@ -1796,7 +1796,7 @@ typedef npy_longlong __pyx_t_5numpy_longlong_t; */ typedef npy_ulong __pyx_t_5numpy_uint_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":758 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":758 * * ctypedef npy_ulong uint_t * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<< @@ -1805,7 +1805,7 @@ typedef npy_ulong __pyx_t_5numpy_uint_t; */ typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":760 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":760 * ctypedef npy_ulonglong ulonglong_t * * ctypedef npy_intp intp_t # <<<<<<<<<<<<<< @@ -1814,7 +1814,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; */ typedef npy_intp __pyx_t_5numpy_intp_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":761 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":761 * * ctypedef npy_intp intp_t * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<< @@ -1823,7 +1823,7 @@ typedef npy_intp __pyx_t_5numpy_intp_t; */ typedef npy_uintp __pyx_t_5numpy_uintp_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":763 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":763 * ctypedef npy_uintp uintp_t * * ctypedef npy_double float_t # <<<<<<<<<<<<<< @@ -1832,7 +1832,7 @@ typedef npy_uintp __pyx_t_5numpy_uintp_t; */ typedef npy_double __pyx_t_5numpy_float_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":764 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":764 * * ctypedef npy_double float_t * ctypedef npy_double double_t # <<<<<<<<<<<<<< @@ -1841,7 +1841,7 @@ typedef npy_double __pyx_t_5numpy_float_t; */ typedef npy_double __pyx_t_5numpy_double_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":765 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":765 * ctypedef npy_double float_t * ctypedef npy_double double_t * ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<< @@ -1882,7 +1882,7 @@ struct __pyx_MemviewEnum_obj; struct __pyx_memoryview_obj; struct __pyx_memoryviewslice_obj; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":767 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":767 * ctypedef npy_longdouble longdouble_t * * ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<< @@ -1891,7 +1891,7 @@ struct __pyx_memoryviewslice_obj; */ typedef npy_cfloat __pyx_t_5numpy_cfloat_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":768 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":768 * * ctypedef npy_cfloat cfloat_t * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<< @@ -1900,7 +1900,7 @@ typedef npy_cfloat __pyx_t_5numpy_cfloat_t; */ typedef npy_cdouble __pyx_t_5numpy_cdouble_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":769 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":769 * ctypedef npy_cfloat cfloat_t * ctypedef npy_cdouble cdouble_t * ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<< @@ -1909,7 +1909,7 @@ typedef npy_cdouble __pyx_t_5numpy_cdouble_t; */ typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":771 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":771 * ctypedef npy_clongdouble clongdouble_t * * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<< @@ -19148,7 +19148,7 @@ static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *__ return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":245 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":245 * * @property * cdef inline PyObject* base(self) nogil: # <<<<<<<<<<<<<< @@ -19159,7 +19159,7 @@ static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *__ static CYTHON_INLINE PyObject *__pyx_f_5numpy_7ndarray_4base_base(PyArrayObject *__pyx_v_self) { PyObject *__pyx_r; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":248 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":248 * """Returns a borrowed reference to the object owning the data/memory. * """ * return PyArray_BASE(self) # <<<<<<<<<<<<<< @@ -19169,7 +19169,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_7ndarray_4base_base(PyArrayObject __pyx_r = PyArray_BASE(__pyx_v_self); goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":245 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":245 * * @property * cdef inline PyObject* base(self) nogil: # <<<<<<<<<<<<<< @@ -19182,7 +19182,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_7ndarray_4base_base(PyArrayObject return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":251 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":251 * * @property * cdef inline dtype descr(self): # <<<<<<<<<<<<<< @@ -19196,7 +19196,7 @@ static CYTHON_INLINE PyArray_Descr *__pyx_f_5numpy_7ndarray_5descr_descr(PyArray PyArray_Descr *__pyx_t_1; __Pyx_RefNannySetupContext("descr", 1); - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":254 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":254 * """Returns an owned reference to the dtype of the array. * """ * return PyArray_DESCR(self) # <<<<<<<<<<<<<< @@ -19209,7 +19209,7 @@ static CYTHON_INLINE PyArray_Descr *__pyx_f_5numpy_7ndarray_5descr_descr(PyArray __pyx_r = ((PyArray_Descr *)__pyx_t_1); goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":251 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":251 * * @property * cdef inline dtype descr(self): # <<<<<<<<<<<<<< @@ -19224,7 +19224,7 @@ static CYTHON_INLINE PyArray_Descr *__pyx_f_5numpy_7ndarray_5descr_descr(PyArray return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":257 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":257 * * @property * cdef inline int ndim(self) nogil: # <<<<<<<<<<<<<< @@ -19235,7 +19235,7 @@ static CYTHON_INLINE PyArray_Descr *__pyx_f_5numpy_7ndarray_5descr_descr(PyArray static CYTHON_INLINE int __pyx_f_5numpy_7ndarray_4ndim_ndim(PyArrayObject *__pyx_v_self) { int __pyx_r; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":260 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":260 * """Returns the number of dimensions in the array. * """ * return PyArray_NDIM(self) # <<<<<<<<<<<<<< @@ -19245,7 +19245,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_7ndarray_4ndim_ndim(PyArrayObject *__pyx __pyx_r = PyArray_NDIM(__pyx_v_self); goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":257 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":257 * * @property * cdef inline int ndim(self) nogil: # <<<<<<<<<<<<<< @@ -19258,7 +19258,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_7ndarray_4ndim_ndim(PyArrayObject *__pyx return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":263 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":263 * * @property * cdef inline npy_intp *shape(self) nogil: # <<<<<<<<<<<<<< @@ -19269,7 +19269,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_7ndarray_4ndim_ndim(PyArrayObject *__pyx static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_5shape_shape(PyArrayObject *__pyx_v_self) { npy_intp *__pyx_r; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":268 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":268 * Can return NULL for 0-dimensional arrays. * """ * return PyArray_DIMS(self) # <<<<<<<<<<<<<< @@ -19279,7 +19279,7 @@ static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_5shape_shape(PyArrayObjec __pyx_r = PyArray_DIMS(__pyx_v_self); goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":263 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":263 * * @property * cdef inline npy_intp *shape(self) nogil: # <<<<<<<<<<<<<< @@ -19292,7 +19292,7 @@ static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_5shape_shape(PyArrayObjec return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":271 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":271 * * @property * cdef inline npy_intp *strides(self) nogil: # <<<<<<<<<<<<<< @@ -19303,7 +19303,7 @@ static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_5shape_shape(PyArrayObjec static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_7strides_strides(PyArrayObject *__pyx_v_self) { npy_intp *__pyx_r; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":275 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":275 * The number of elements matches the number of dimensions of the array (ndim). * """ * return PyArray_STRIDES(self) # <<<<<<<<<<<<<< @@ -19313,7 +19313,7 @@ static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_7strides_strides(PyArrayO __pyx_r = PyArray_STRIDES(__pyx_v_self); goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":271 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":271 * * @property * cdef inline npy_intp *strides(self) nogil: # <<<<<<<<<<<<<< @@ -19326,7 +19326,7 @@ static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_7strides_strides(PyArrayO return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":278 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":278 * * @property * cdef inline npy_intp size(self) nogil: # <<<<<<<<<<<<<< @@ -19337,7 +19337,7 @@ static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_7strides_strides(PyArrayO static CYTHON_INLINE npy_intp __pyx_f_5numpy_7ndarray_4size_size(PyArrayObject *__pyx_v_self) { npy_intp __pyx_r; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":281 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":281 * """Returns the total size (in number of elements) of the array. * """ * return PyArray_SIZE(self) # <<<<<<<<<<<<<< @@ -19347,7 +19347,7 @@ static CYTHON_INLINE npy_intp __pyx_f_5numpy_7ndarray_4size_size(PyArrayObject * __pyx_r = PyArray_SIZE(__pyx_v_self); goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":278 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":278 * * @property * cdef inline npy_intp size(self) nogil: # <<<<<<<<<<<<<< @@ -19360,7 +19360,7 @@ static CYTHON_INLINE npy_intp __pyx_f_5numpy_7ndarray_4size_size(PyArrayObject * return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":284 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":284 * * @property * cdef inline char* data(self) nogil: # <<<<<<<<<<<<<< @@ -19371,7 +19371,7 @@ static CYTHON_INLINE npy_intp __pyx_f_5numpy_7ndarray_4size_size(PyArrayObject * static CYTHON_INLINE char *__pyx_f_5numpy_7ndarray_4data_data(PyArrayObject *__pyx_v_self) { char *__pyx_r; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":290 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":290 * of `PyArray_DATA()` instead, which returns a 'void*'. * """ * return PyArray_BYTES(self) # <<<<<<<<<<<<<< @@ -19381,7 +19381,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy_7ndarray_4data_data(PyArrayObject *__p __pyx_r = PyArray_BYTES(__pyx_v_self); goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":284 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":284 * * @property * cdef inline char* data(self) nogil: # <<<<<<<<<<<<<< @@ -19394,7 +19394,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy_7ndarray_4data_data(PyArrayObject *__p return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":773 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":773 * ctypedef npy_cdouble complex_t * * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< @@ -19411,7 +19411,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 1); - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":774 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":774 * * cdef inline object PyArray_MultiIterNew1(a): * return PyArray_MultiIterNew(1, a) # <<<<<<<<<<<<<< @@ -19425,7 +19425,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__ __pyx_t_1 = 0; goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":773 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":773 * ctypedef npy_cdouble complex_t * * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< @@ -19444,7 +19444,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__ return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":776 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":776 * return PyArray_MultiIterNew(1, a) * * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< @@ -19461,7 +19461,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 1); - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":777 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":777 * * cdef inline object PyArray_MultiIterNew2(a, b): * return PyArray_MultiIterNew(2, a, b) # <<<<<<<<<<<<<< @@ -19475,7 +19475,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__ __pyx_t_1 = 0; goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":776 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":776 * return PyArray_MultiIterNew(1, a) * * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< @@ -19494,7 +19494,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__ return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":779 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":779 * return PyArray_MultiIterNew(2, a, b) * * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< @@ -19511,7 +19511,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 1); - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":780 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":780 * * cdef inline object PyArray_MultiIterNew3(a, b, c): * return PyArray_MultiIterNew(3, a, b, c) # <<<<<<<<<<<<<< @@ -19525,7 +19525,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__ __pyx_t_1 = 0; goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":779 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":779 * return PyArray_MultiIterNew(2, a, b) * * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< @@ -19544,7 +19544,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__ return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":782 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":782 * return PyArray_MultiIterNew(3, a, b, c) * * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< @@ -19561,7 +19561,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 1); - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":783 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":783 * * cdef inline object PyArray_MultiIterNew4(a, b, c, d): * return PyArray_MultiIterNew(4, a, b, c, d) # <<<<<<<<<<<<<< @@ -19575,7 +19575,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__ __pyx_t_1 = 0; goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":782 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":782 * return PyArray_MultiIterNew(3, a, b, c) * * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< @@ -19594,7 +19594,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__ return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":785 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":785 * return PyArray_MultiIterNew(4, a, b, c, d) * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< @@ -19611,7 +19611,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 1); - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":786 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":786 * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<< @@ -19625,7 +19625,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__ __pyx_t_1 = 0; goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":785 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":785 * return PyArray_MultiIterNew(4, a, b, c, d) * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< @@ -19644,7 +19644,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__ return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":788 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":788 * return PyArray_MultiIterNew(5, a, b, c, d, e) * * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< @@ -19658,7 +19658,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ int __pyx_t_1; __Pyx_RefNannySetupContext("PyDataType_SHAPE", 1); - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":789 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":789 * * cdef inline tuple PyDataType_SHAPE(dtype d): * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< @@ -19668,7 +19668,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ __pyx_t_1 = PyDataType_HASSUBARRAY(__pyx_v_d); if (__pyx_t_1) { - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":790 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":790 * cdef inline tuple PyDataType_SHAPE(dtype d): * if PyDataType_HASSUBARRAY(d): * return d.subarray.shape # <<<<<<<<<<<<<< @@ -19680,7 +19680,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape); goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":789 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":789 * * cdef inline tuple PyDataType_SHAPE(dtype d): * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< @@ -19689,7 +19689,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ */ } - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":792 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":792 * return d.subarray.shape * else: * return () # <<<<<<<<<<<<<< @@ -19703,7 +19703,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ goto __pyx_L0; } - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":788 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":788 * return PyArray_MultiIterNew(5, a, b, c, d, e) * * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< @@ -19718,7 +19718,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":968 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":968 * int _import_umath() except -1 * * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< @@ -19732,7 +19732,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a const char *__pyx_filename = NULL; int __pyx_clineno = 0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":969 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":969 * * cdef inline void set_array_base(ndarray arr, object base): * Py_INCREF(base) # important to do this before stealing the reference below! # <<<<<<<<<<<<<< @@ -19741,7 +19741,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a */ Py_INCREF(__pyx_v_base); - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":970 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":970 * cdef inline void set_array_base(ndarray arr, object base): * Py_INCREF(base) # important to do this before stealing the reference below! * PyArray_SetBaseObject(arr, base) # <<<<<<<<<<<<<< @@ -19750,7 +19750,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a */ __pyx_t_1 = PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(2, 970, __pyx_L1_error) - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":968 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":968 * int _import_umath() except -1 * * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< @@ -19765,7 +19765,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a __pyx_L0:; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":972 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":972 * PyArray_SetBaseObject(arr, base) * * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< @@ -19780,7 +19780,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py int __pyx_t_1; __Pyx_RefNannySetupContext("get_array_base", 1); - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":973 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":973 * * cdef inline object get_array_base(ndarray arr): * base = PyArray_BASE(arr) # <<<<<<<<<<<<<< @@ -19789,7 +19789,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py */ __pyx_v_base = PyArray_BASE(__pyx_v_arr); - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":974 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":974 * cdef inline object get_array_base(ndarray arr): * base = PyArray_BASE(arr) * if base is NULL: # <<<<<<<<<<<<<< @@ -19799,7 +19799,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py __pyx_t_1 = (__pyx_v_base == NULL); if (__pyx_t_1) { - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":975 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":975 * base = PyArray_BASE(arr) * if base is NULL: * return None # <<<<<<<<<<<<<< @@ -19810,7 +19810,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":974 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":974 * cdef inline object get_array_base(ndarray arr): * base = PyArray_BASE(arr) * if base is NULL: # <<<<<<<<<<<<<< @@ -19819,7 +19819,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py */ } - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":976 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":976 * if base is NULL: * return None * return base # <<<<<<<<<<<<<< @@ -19831,7 +19831,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py __pyx_r = ((PyObject *)__pyx_v_base); goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":972 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":972 * PyArray_SetBaseObject(arr, base) * * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< @@ -19846,7 +19846,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":980 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":980 * # Versions of the import_* functions which are more suitable for * # Cython code. * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< @@ -19870,7 +19870,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { int __pyx_clineno = 0; __Pyx_RefNannySetupContext("import_array", 1); - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":981 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":981 * # Cython code. * cdef inline int import_array() except -1: * try: # <<<<<<<<<<<<<< @@ -19886,7 +19886,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":982 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":982 * cdef inline int import_array() except -1: * try: * __pyx_import_array() # <<<<<<<<<<<<<< @@ -19895,7 +19895,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { */ __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 982, __pyx_L3_error) - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":981 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":981 * # Cython code. * cdef inline int import_array() except -1: * try: # <<<<<<<<<<<<<< @@ -19909,7 +19909,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { goto __pyx_L8_try_end; __pyx_L3_error:; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":983 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":983 * try: * __pyx_import_array() * except Exception: # <<<<<<<<<<<<<< @@ -19924,7 +19924,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":984 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":984 * __pyx_import_array() * except Exception: * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< @@ -19939,7 +19939,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { } goto __pyx_L5_except_error; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":981 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":981 * # Cython code. * cdef inline int import_array() except -1: * try: # <<<<<<<<<<<<<< @@ -19955,7 +19955,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { __pyx_L8_try_end:; } - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":980 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":980 * # Versions of the import_* functions which are more suitable for * # Cython code. * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< @@ -19978,7 +19978,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":986 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":986 * raise ImportError("numpy.core.multiarray failed to import") * * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< @@ -20002,7 +20002,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { int __pyx_clineno = 0; __Pyx_RefNannySetupContext("import_umath", 1); - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":987 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":987 * * cdef inline int import_umath() except -1: * try: # <<<<<<<<<<<<<< @@ -20018,7 +20018,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":988 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":988 * cdef inline int import_umath() except -1: * try: * _import_umath() # <<<<<<<<<<<<<< @@ -20027,7 +20027,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { */ __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 988, __pyx_L3_error) - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":987 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":987 * * cdef inline int import_umath() except -1: * try: # <<<<<<<<<<<<<< @@ -20041,7 +20041,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { goto __pyx_L8_try_end; __pyx_L3_error:; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":989 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":989 * try: * _import_umath() * except Exception: # <<<<<<<<<<<<<< @@ -20056,7 +20056,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":990 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":990 * _import_umath() * except Exception: * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< @@ -20071,7 +20071,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { } goto __pyx_L5_except_error; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":987 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":987 * * cdef inline int import_umath() except -1: * try: # <<<<<<<<<<<<<< @@ -20087,7 +20087,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { __pyx_L8_try_end:; } - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":986 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":986 * raise ImportError("numpy.core.multiarray failed to import") * * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< @@ -20110,7 +20110,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":992 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":992 * raise ImportError("numpy.core.umath failed to import") * * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< @@ -20134,7 +20134,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { int __pyx_clineno = 0; __Pyx_RefNannySetupContext("import_ufunc", 1); - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":993 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":993 * * cdef inline int import_ufunc() except -1: * try: # <<<<<<<<<<<<<< @@ -20150,7 +20150,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":994 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":994 * cdef inline int import_ufunc() except -1: * try: * _import_umath() # <<<<<<<<<<<<<< @@ -20159,7 +20159,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { */ __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 994, __pyx_L3_error) - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":993 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":993 * * cdef inline int import_ufunc() except -1: * try: # <<<<<<<<<<<<<< @@ -20173,7 +20173,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { goto __pyx_L8_try_end; __pyx_L3_error:; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":995 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":995 * try: * _import_umath() * except Exception: # <<<<<<<<<<<<<< @@ -20188,7 +20188,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":996 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":996 * _import_umath() * except Exception: * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< @@ -20203,7 +20203,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { } goto __pyx_L5_except_error; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":993 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":993 * * cdef inline int import_ufunc() except -1: * try: # <<<<<<<<<<<<<< @@ -20219,7 +20219,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { __pyx_L8_try_end:; } - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":992 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":992 * raise ImportError("numpy.core.umath failed to import") * * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< @@ -20242,7 +20242,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":999 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":999 * * * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<< @@ -20253,7 +20253,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_obj) { int __pyx_r; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1011 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":1011 * bool * """ * return PyObject_TypeCheck(obj, &PyTimedeltaArrType_Type) # <<<<<<<<<<<<<< @@ -20263,7 +20263,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_ __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyTimedeltaArrType_Type)); goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":999 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":999 * * * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<< @@ -20276,7 +20276,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_ return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1014 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":1014 * * * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<< @@ -20287,7 +20287,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_ static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_obj) { int __pyx_r; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1026 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":1026 * bool * """ * return PyObject_TypeCheck(obj, &PyDatetimeArrType_Type) # <<<<<<<<<<<<<< @@ -20297,7 +20297,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_o __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyDatetimeArrType_Type)); goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1014 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":1014 * * * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<< @@ -20310,7 +20310,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_o return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1029 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":1029 * * * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<< @@ -20321,7 +20321,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_o static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject *__pyx_v_obj) { npy_datetime __pyx_r; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1036 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":1036 * also needed. That can be found using `get_datetime64_unit`. * """ * return (obj).obval # <<<<<<<<<<<<<< @@ -20331,7 +20331,7 @@ static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject * __pyx_r = ((PyDatetimeScalarObject *)__pyx_v_obj)->obval; goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1029 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":1029 * * * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<< @@ -20344,7 +20344,7 @@ static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject * return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1039 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":1039 * * * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<< @@ -20355,7 +20355,7 @@ static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject * static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject *__pyx_v_obj) { npy_timedelta __pyx_r; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1043 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":1043 * returns the int64 value underlying scalar numpy timedelta64 object * """ * return (obj).obval # <<<<<<<<<<<<<< @@ -20365,7 +20365,7 @@ static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject __pyx_r = ((PyTimedeltaScalarObject *)__pyx_v_obj)->obval; goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1039 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":1039 * * * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<< @@ -20378,7 +20378,7 @@ static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1046 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":1046 * * * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< @@ -20389,7 +20389,7 @@ static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObject *__pyx_v_obj) { NPY_DATETIMEUNIT __pyx_r; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1050 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":1050 * returns the unit part of the dtype for a numpy datetime64 object. * """ * return (obj).obmeta.base # <<<<<<<<<<<<<< @@ -20397,7 +20397,7 @@ static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObjec __pyx_r = ((NPY_DATETIMEUNIT)((PyDatetimeScalarObject *)__pyx_v_obj)->obmeta.base); goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1046 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":1046 * * * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< @@ -36752,7 +36752,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__8); __Pyx_GIVEREF(__pyx_tuple__8); - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":984 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":984 * __pyx_import_array() * except Exception: * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< @@ -36763,7 +36763,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__9); __Pyx_GIVEREF(__pyx_tuple__9); - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":990 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":990 * _import_umath() * except Exception: * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< diff --git a/mlsauce/booster/_booster_classifier.py b/mlsauce/booster/_booster_classifier.py index 53746f8..4ff337b 100644 --- a/mlsauce/booster/_booster_classifier.py +++ b/mlsauce/booster/_booster_classifier.py @@ -1,10 +1,17 @@ +try: + from . import _boosterc as boosterc +except ImportError: + import pyximport + + pyximport.install() + import _boosterc as boosterc import numpy as np import platform import warnings from sklearn.base import BaseEstimator from sklearn.base import ClassifierMixin -from . import _boosterc as boosterc -from ..utils import cluster + +from ..utils import cluster class LSBoostClassifier(BaseEstimator, ClassifierMixin): @@ -55,13 +62,13 @@ class LSBoostClassifier(BaseEstimator, ClassifierMixin): activation: str activation function: currently 'relu', 'relu6', 'sigmoid', 'tanh' - + n_clusters: int number of clusters for clustering the features - + clustering_method: str clustering method: currently 'kmeans', 'gmm' - + cluster_scaling: str scaling method for clustering: currently 'standard', 'robust', 'minmax' @@ -83,11 +90,11 @@ def __init__( backend="cpu", solver="ridge", activation="relu", - n_clusters = 0, - clustering_method = "kmeans", - cluster_scaling = "standard" + n_clusters=0, + clustering_method="kmeans", + cluster_scaling="standard", ): - if n_clusters > 0: + if n_clusters > 0: assert clustering_method in ( "kmeans", "gmm", @@ -135,7 +142,7 @@ def __init__( self.n_clusters = n_clusters self.clustering_method = clustering_method self.cluster_scaling = cluster_scaling - self.scaler_, self.label_encoder_, self.clusterer_ = None, None, None + self.scaler_, self.label_encoder_, self.clusterer_ = None, None, None def fit(self, X, y, **kwargs): """Fit Booster (classifier) to training data (X, y) @@ -156,12 +163,17 @@ def fit(self, X, y, **kwargs): self: object. """ - if self.n_clusters > 0: - clustered_X, self.scaler_, self.label_encoder_, self.clusterer_ = cluster(X, n_clusters=self.n_clusters, - method=self.clustering_method, - type_scaling=self.cluster_scaling, - training=True, - seed=self.seed) + if self.n_clusters > 0: + clustered_X, self.scaler_, self.label_encoder_, self.clusterer_ = ( + cluster( + X, + n_clusters=self.n_clusters, + method=self.clustering_method, + type_scaling=self.cluster_scaling, + training=True, + seed=self.seed, + ) + ) X = np.column_stack((X.copy(), clustered_X)) self.obj = boosterc.fit_booster_classifier( @@ -181,8 +193,8 @@ def fit(self, X, y, **kwargs): backend=self.backend, solver=self.solver, activation=self.activation, - ) - self.n_classes_ = len(np.unique(y)) # for compatibility with sklearn + ) + self.n_classes_ = len(np.unique(y)) # for compatibility with sklearn self.n_estimators = self.obj["n_estimators"] return self @@ -222,13 +234,19 @@ def predict_proba(self, X, **kwargs): probability estimates for test data: {array-like} """ if self.n_clusters > 0: - X = np.column_stack((X.copy(), cluster( - X, training=False, - scaler=self.scaler_, - label_encoder=self.label_encoder_, - clusterer=self.clusterer_, - seed=self.seed - ))) + X = np.column_stack( + ( + X.copy(), + cluster( + X, + training=False, + scaler=self.scaler_, + label_encoder=self.label_encoder_, + clusterer=self.clusterer_, + seed=self.seed, + ), + ) + ) return boosterc.predict_proba_booster_classifier( self.obj, np.asarray(X, order="C") ) diff --git a/mlsauce/booster/_booster_regressor.py b/mlsauce/booster/_booster_regressor.py index 4e63c26..3f77a23 100644 --- a/mlsauce/booster/_booster_regressor.py +++ b/mlsauce/booster/_booster_regressor.py @@ -1,3 +1,9 @@ +try: + from . import _boosterc as boosterc +except ImportError: + import pyximport + pyximport.install() + import _boosterc as boosterc import numpy as np import platform import warnings @@ -5,7 +11,8 @@ from sklearn.base import RegressorMixin from . import _boosterc as boosterc from ..predictioninterval import PredictionInterval -from ..utils import cluster +from ..utils import cluster + class LSBoostRegressor(BaseEstimator, RegressorMixin): """LSBoost regressor. @@ -68,12 +75,12 @@ class LSBoostRegressor(BaseEstimator, RegressorMixin): n_clusters: int number of clusters for clustering the features - + clustering_method: str clustering method: currently 'kmeans', 'gmm' - + cluster_scaling: str - scaling method for clustering: currently 'standard', 'robust', 'minmax' + scaling method for clustering: currently 'standard', 'robust', 'minmax' """ @@ -96,11 +103,11 @@ def __init__( type_pi=None, replications=None, kernel=None, - n_clusters = 0, - clustering_method = "kmeans", - cluster_scaling = "standard" + n_clusters=0, + clustering_method="kmeans", + cluster_scaling="standard", ): - if n_clusters > 0: + if n_clusters > 0: assert clustering_method in ( "kmeans", "gmm", @@ -151,7 +158,7 @@ def __init__( self.n_clusters = n_clusters self.clustering_method = clustering_method self.cluster_scaling = cluster_scaling - self.scaler_, self.label_encoder_, self.clusterer_ = None, None, None + self.scaler_, self.label_encoder_, self.clusterer_ = None, None, None def fit(self, X, y, **kwargs): """Fit Booster (regressor) to training data (X, y) @@ -172,12 +179,17 @@ def fit(self, X, y, **kwargs): self: object. """ - if self.n_clusters > 0: - clustered_X, self.scaler_, self.label_encoder_, self.clusterer_ = cluster(X, n_clusters=self.n_clusters, - method=self.clustering_method, - type_scaling=self.cluster_scaling, - training=True, - seed=self.seed) + if self.n_clusters > 0: + clustered_X, self.scaler_, self.label_encoder_, self.clusterer_ = ( + cluster( + X, + n_clusters=self.n_clusters, + method=self.clustering_method, + type_scaling=self.cluster_scaling, + training=True, + seed=self.seed, + ) + ) X = np.column_stack((X.copy(), clustered_X)) self.obj = boosterc.fit_booster_regressor( @@ -232,13 +244,19 @@ def predict(self, X, level=95, method=None, **kwargs): """ if self.n_clusters > 0: - X = np.column_stack((X.copy(), cluster( - X, training=False, - scaler=self.scaler_, - label_encoder=self.label_encoder_, - clusterer=self.clusterer_, - seed=self.seed - ))) + X = np.column_stack( + ( + X.copy(), + cluster( + X, + training=False, + scaler=self.scaler_, + label_encoder=self.label_encoder_, + clusterer=self.clusterer_, + seed=self.seed, + ), + ) + ) if "return_pi" in kwargs: assert method in ( "splitconformal", diff --git a/mlsauce/lasso/_lasso.py b/mlsauce/lasso/_lasso.py index 980c733..6834635 100644 --- a/mlsauce/lasso/_lasso.py +++ b/mlsauce/lasso/_lasso.py @@ -5,7 +5,13 @@ from sklearn.base import BaseEstimator from sklearn.base import RegressorMixin from numpy.linalg import inv -from . import _lassoc as mo +try: + from . import _lassoc as mo +except ImportError: + import pyximport + + pyximport.install() + import _lassoc as mo from ..utils import get_beta if platform.system() in ("Linux", "Darwin"): @@ -76,16 +82,16 @@ def fit(self, X, y, **kwargs): self.ym, centered_y = mo.center_response(y) self.xm = X.mean(axis=0) self.xsd = X.std(axis=0) - self.xsd[self.xsd == 0] = 1 + self.xsd[self.xsd == 0] = 1 X_ = (X - self.xm[None, :]) / self.xsd[None, :] XX = mo.crossprod(X_, backend=self.backend) Xy = mo.crossprod(X_, centered_y, backend=self.backend) XX2 = 2 * XX Xy2 = 2 * Xy - if self.backend == "cpu": - #beta0, _, _, _ = np.linalg.lstsq(X_, centered_y, rcond=None) - beta0 = get_beta(X_, centered_y) + if self.backend == "cpu": + # beta0, _, _, _ = np.linalg.lstsq(X_, centered_y, rcond=None) + beta0 = get_beta(X_, centered_y) if len(np.asarray(y).shape) == 1: res = mo.get_beta_1D( beta0=np.asarray(beta0), diff --git a/mlsauce/lasso/_lassoc.c b/mlsauce/lasso/_lassoc.c index b0098b3..309efff 100644 --- a/mlsauce/lasso/_lassoc.c +++ b/mlsauce/lasso/_lassoc.c @@ -4,14 +4,14 @@ { "distutils": { "depends": [ - "/workspaces/codespaces-blank/mlsauce/venv/lib/python3.10/site-packages/numpy/core/include/numpy/arrayobject.h", - "/workspaces/codespaces-blank/mlsauce/venv/lib/python3.10/site-packages/numpy/core/include/numpy/arrayscalars.h", - "/workspaces/codespaces-blank/mlsauce/venv/lib/python3.10/site-packages/numpy/core/include/numpy/ndarrayobject.h", - "/workspaces/codespaces-blank/mlsauce/venv/lib/python3.10/site-packages/numpy/core/include/numpy/ndarraytypes.h", - "/workspaces/codespaces-blank/mlsauce/venv/lib/python3.10/site-packages/numpy/core/include/numpy/ufuncobject.h" + "/Users/t/Documents/Python_Packages/mlsauce/venv/lib/python3.11/site-packages/numpy/core/include/numpy/arrayobject.h", + "/Users/t/Documents/Python_Packages/mlsauce/venv/lib/python3.11/site-packages/numpy/core/include/numpy/arrayscalars.h", + "/Users/t/Documents/Python_Packages/mlsauce/venv/lib/python3.11/site-packages/numpy/core/include/numpy/ndarrayobject.h", + "/Users/t/Documents/Python_Packages/mlsauce/venv/lib/python3.11/site-packages/numpy/core/include/numpy/ndarraytypes.h", + "/Users/t/Documents/Python_Packages/mlsauce/venv/lib/python3.11/site-packages/numpy/core/include/numpy/ufuncobject.h" ], "include_dirs": [ - "/workspaces/codespaces-blank/mlsauce/venv/lib/python3.10/site-packages/numpy/core/include" + "/Users/t/Documents/Python_Packages/mlsauce/venv/lib/python3.11/site-packages/numpy/core/include" ], "library_dirs": [ "mlsauce/lasso/" @@ -1531,8 +1531,8 @@ static const char *__pyx_filename; static const char *__pyx_f[] = { "mlsauce/lasso/_lassoc.pyx", "", - "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd", - "venv/lib/python3.10/site-packages/Cython/Includes/cpython/type.pxd", + "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd", + "venv/lib/python3.11/site-packages/Cython/Includes/cpython/type.pxd", }; /* #### Code section: utility_code_proto_before_types ### */ /* ForceInitThreads.proto */ @@ -1678,7 +1678,7 @@ typedef struct { /* #### Code section: numeric_typedefs ### */ -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":730 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":730 * # in Cython to enable them only on the right systems. * * ctypedef npy_int8 int8_t # <<<<<<<<<<<<<< @@ -1687,7 +1687,7 @@ typedef struct { */ typedef npy_int8 __pyx_t_5numpy_int8_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":731 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":731 * * ctypedef npy_int8 int8_t * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<< @@ -1696,7 +1696,7 @@ typedef npy_int8 __pyx_t_5numpy_int8_t; */ typedef npy_int16 __pyx_t_5numpy_int16_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":732 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":732 * ctypedef npy_int8 int8_t * ctypedef npy_int16 int16_t * ctypedef npy_int32 int32_t # <<<<<<<<<<<<<< @@ -1705,7 +1705,7 @@ typedef npy_int16 __pyx_t_5numpy_int16_t; */ typedef npy_int32 __pyx_t_5numpy_int32_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":733 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":733 * ctypedef npy_int16 int16_t * ctypedef npy_int32 int32_t * ctypedef npy_int64 int64_t # <<<<<<<<<<<<<< @@ -1714,7 +1714,7 @@ typedef npy_int32 __pyx_t_5numpy_int32_t; */ typedef npy_int64 __pyx_t_5numpy_int64_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":737 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":737 * #ctypedef npy_int128 int128_t * * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<< @@ -1723,7 +1723,7 @@ typedef npy_int64 __pyx_t_5numpy_int64_t; */ typedef npy_uint8 __pyx_t_5numpy_uint8_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":738 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":738 * * ctypedef npy_uint8 uint8_t * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<< @@ -1732,7 +1732,7 @@ typedef npy_uint8 __pyx_t_5numpy_uint8_t; */ typedef npy_uint16 __pyx_t_5numpy_uint16_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":739 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":739 * ctypedef npy_uint8 uint8_t * ctypedef npy_uint16 uint16_t * ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<< @@ -1741,7 +1741,7 @@ typedef npy_uint16 __pyx_t_5numpy_uint16_t; */ typedef npy_uint32 __pyx_t_5numpy_uint32_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":740 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":740 * ctypedef npy_uint16 uint16_t * ctypedef npy_uint32 uint32_t * ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<< @@ -1750,7 +1750,7 @@ typedef npy_uint32 __pyx_t_5numpy_uint32_t; */ typedef npy_uint64 __pyx_t_5numpy_uint64_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":744 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":744 * #ctypedef npy_uint128 uint128_t * * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<< @@ -1759,7 +1759,7 @@ typedef npy_uint64 __pyx_t_5numpy_uint64_t; */ typedef npy_float32 __pyx_t_5numpy_float32_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":745 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":745 * * ctypedef npy_float32 float32_t * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<< @@ -1768,7 +1768,7 @@ typedef npy_float32 __pyx_t_5numpy_float32_t; */ typedef npy_float64 __pyx_t_5numpy_float64_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":754 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":754 * # The int types are mapped a bit surprising -- * # numpy.int corresponds to 'l' and numpy.long to 'q' * ctypedef npy_long int_t # <<<<<<<<<<<<<< @@ -1777,7 +1777,7 @@ typedef npy_float64 __pyx_t_5numpy_float64_t; */ typedef npy_long __pyx_t_5numpy_int_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":755 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":755 * # numpy.int corresponds to 'l' and numpy.long to 'q' * ctypedef npy_long int_t * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<< @@ -1786,7 +1786,7 @@ typedef npy_long __pyx_t_5numpy_int_t; */ typedef npy_longlong __pyx_t_5numpy_longlong_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":757 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":757 * ctypedef npy_longlong longlong_t * * ctypedef npy_ulong uint_t # <<<<<<<<<<<<<< @@ -1795,7 +1795,7 @@ typedef npy_longlong __pyx_t_5numpy_longlong_t; */ typedef npy_ulong __pyx_t_5numpy_uint_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":758 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":758 * * ctypedef npy_ulong uint_t * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<< @@ -1804,7 +1804,7 @@ typedef npy_ulong __pyx_t_5numpy_uint_t; */ typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":760 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":760 * ctypedef npy_ulonglong ulonglong_t * * ctypedef npy_intp intp_t # <<<<<<<<<<<<<< @@ -1813,7 +1813,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; */ typedef npy_intp __pyx_t_5numpy_intp_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":761 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":761 * * ctypedef npy_intp intp_t * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<< @@ -1822,7 +1822,7 @@ typedef npy_intp __pyx_t_5numpy_intp_t; */ typedef npy_uintp __pyx_t_5numpy_uintp_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":763 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":763 * ctypedef npy_uintp uintp_t * * ctypedef npy_double float_t # <<<<<<<<<<<<<< @@ -1831,7 +1831,7 @@ typedef npy_uintp __pyx_t_5numpy_uintp_t; */ typedef npy_double __pyx_t_5numpy_float_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":764 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":764 * * ctypedef npy_double float_t * ctypedef npy_double double_t # <<<<<<<<<<<<<< @@ -1840,7 +1840,7 @@ typedef npy_double __pyx_t_5numpy_float_t; */ typedef npy_double __pyx_t_5numpy_double_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":765 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":765 * ctypedef npy_double float_t * ctypedef npy_double double_t * ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<< @@ -1881,7 +1881,7 @@ struct __pyx_MemviewEnum_obj; struct __pyx_memoryview_obj; struct __pyx_memoryviewslice_obj; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":767 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":767 * ctypedef npy_longdouble longdouble_t * * ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<< @@ -1890,7 +1890,7 @@ struct __pyx_memoryviewslice_obj; */ typedef npy_cfloat __pyx_t_5numpy_cfloat_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":768 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":768 * * ctypedef npy_cfloat cfloat_t * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<< @@ -1899,7 +1899,7 @@ typedef npy_cfloat __pyx_t_5numpy_cfloat_t; */ typedef npy_cdouble __pyx_t_5numpy_cdouble_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":769 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":769 * ctypedef npy_cfloat cfloat_t * ctypedef npy_cdouble cdouble_t * ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<< @@ -1908,7 +1908,7 @@ typedef npy_cdouble __pyx_t_5numpy_cdouble_t; */ typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":771 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":771 * ctypedef npy_clongdouble clongdouble_t * * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<< @@ -18699,7 +18699,7 @@ static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *__ return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":245 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":245 * * @property * cdef inline PyObject* base(self) nogil: # <<<<<<<<<<<<<< @@ -18710,7 +18710,7 @@ static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *__ static CYTHON_INLINE PyObject *__pyx_f_5numpy_7ndarray_4base_base(PyArrayObject *__pyx_v_self) { PyObject *__pyx_r; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":248 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":248 * """Returns a borrowed reference to the object owning the data/memory. * """ * return PyArray_BASE(self) # <<<<<<<<<<<<<< @@ -18720,7 +18720,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_7ndarray_4base_base(PyArrayObject __pyx_r = PyArray_BASE(__pyx_v_self); goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":245 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":245 * * @property * cdef inline PyObject* base(self) nogil: # <<<<<<<<<<<<<< @@ -18733,7 +18733,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_7ndarray_4base_base(PyArrayObject return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":251 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":251 * * @property * cdef inline dtype descr(self): # <<<<<<<<<<<<<< @@ -18747,7 +18747,7 @@ static CYTHON_INLINE PyArray_Descr *__pyx_f_5numpy_7ndarray_5descr_descr(PyArray PyArray_Descr *__pyx_t_1; __Pyx_RefNannySetupContext("descr", 1); - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":254 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":254 * """Returns an owned reference to the dtype of the array. * """ * return PyArray_DESCR(self) # <<<<<<<<<<<<<< @@ -18760,7 +18760,7 @@ static CYTHON_INLINE PyArray_Descr *__pyx_f_5numpy_7ndarray_5descr_descr(PyArray __pyx_r = ((PyArray_Descr *)__pyx_t_1); goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":251 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":251 * * @property * cdef inline dtype descr(self): # <<<<<<<<<<<<<< @@ -18775,7 +18775,7 @@ static CYTHON_INLINE PyArray_Descr *__pyx_f_5numpy_7ndarray_5descr_descr(PyArray return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":257 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":257 * * @property * cdef inline int ndim(self) nogil: # <<<<<<<<<<<<<< @@ -18786,7 +18786,7 @@ static CYTHON_INLINE PyArray_Descr *__pyx_f_5numpy_7ndarray_5descr_descr(PyArray static CYTHON_INLINE int __pyx_f_5numpy_7ndarray_4ndim_ndim(PyArrayObject *__pyx_v_self) { int __pyx_r; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":260 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":260 * """Returns the number of dimensions in the array. * """ * return PyArray_NDIM(self) # <<<<<<<<<<<<<< @@ -18796,7 +18796,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_7ndarray_4ndim_ndim(PyArrayObject *__pyx __pyx_r = PyArray_NDIM(__pyx_v_self); goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":257 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":257 * * @property * cdef inline int ndim(self) nogil: # <<<<<<<<<<<<<< @@ -18809,7 +18809,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_7ndarray_4ndim_ndim(PyArrayObject *__pyx return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":263 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":263 * * @property * cdef inline npy_intp *shape(self) nogil: # <<<<<<<<<<<<<< @@ -18820,7 +18820,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_7ndarray_4ndim_ndim(PyArrayObject *__pyx static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_5shape_shape(PyArrayObject *__pyx_v_self) { npy_intp *__pyx_r; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":268 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":268 * Can return NULL for 0-dimensional arrays. * """ * return PyArray_DIMS(self) # <<<<<<<<<<<<<< @@ -18830,7 +18830,7 @@ static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_5shape_shape(PyArrayObjec __pyx_r = PyArray_DIMS(__pyx_v_self); goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":263 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":263 * * @property * cdef inline npy_intp *shape(self) nogil: # <<<<<<<<<<<<<< @@ -18843,7 +18843,7 @@ static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_5shape_shape(PyArrayObjec return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":271 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":271 * * @property * cdef inline npy_intp *strides(self) nogil: # <<<<<<<<<<<<<< @@ -18854,7 +18854,7 @@ static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_5shape_shape(PyArrayObjec static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_7strides_strides(PyArrayObject *__pyx_v_self) { npy_intp *__pyx_r; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":275 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":275 * The number of elements matches the number of dimensions of the array (ndim). * """ * return PyArray_STRIDES(self) # <<<<<<<<<<<<<< @@ -18864,7 +18864,7 @@ static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_7strides_strides(PyArrayO __pyx_r = PyArray_STRIDES(__pyx_v_self); goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":271 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":271 * * @property * cdef inline npy_intp *strides(self) nogil: # <<<<<<<<<<<<<< @@ -18877,7 +18877,7 @@ static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_7strides_strides(PyArrayO return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":278 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":278 * * @property * cdef inline npy_intp size(self) nogil: # <<<<<<<<<<<<<< @@ -18888,7 +18888,7 @@ static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_7strides_strides(PyArrayO static CYTHON_INLINE npy_intp __pyx_f_5numpy_7ndarray_4size_size(PyArrayObject *__pyx_v_self) { npy_intp __pyx_r; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":281 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":281 * """Returns the total size (in number of elements) of the array. * """ * return PyArray_SIZE(self) # <<<<<<<<<<<<<< @@ -18898,7 +18898,7 @@ static CYTHON_INLINE npy_intp __pyx_f_5numpy_7ndarray_4size_size(PyArrayObject * __pyx_r = PyArray_SIZE(__pyx_v_self); goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":278 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":278 * * @property * cdef inline npy_intp size(self) nogil: # <<<<<<<<<<<<<< @@ -18911,7 +18911,7 @@ static CYTHON_INLINE npy_intp __pyx_f_5numpy_7ndarray_4size_size(PyArrayObject * return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":284 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":284 * * @property * cdef inline char* data(self) nogil: # <<<<<<<<<<<<<< @@ -18922,7 +18922,7 @@ static CYTHON_INLINE npy_intp __pyx_f_5numpy_7ndarray_4size_size(PyArrayObject * static CYTHON_INLINE char *__pyx_f_5numpy_7ndarray_4data_data(PyArrayObject *__pyx_v_self) { char *__pyx_r; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":290 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":290 * of `PyArray_DATA()` instead, which returns a 'void*'. * """ * return PyArray_BYTES(self) # <<<<<<<<<<<<<< @@ -18932,7 +18932,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy_7ndarray_4data_data(PyArrayObject *__p __pyx_r = PyArray_BYTES(__pyx_v_self); goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":284 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":284 * * @property * cdef inline char* data(self) nogil: # <<<<<<<<<<<<<< @@ -18945,7 +18945,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy_7ndarray_4data_data(PyArrayObject *__p return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":773 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":773 * ctypedef npy_cdouble complex_t * * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< @@ -18962,7 +18962,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 1); - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":774 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":774 * * cdef inline object PyArray_MultiIterNew1(a): * return PyArray_MultiIterNew(1, a) # <<<<<<<<<<<<<< @@ -18976,7 +18976,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__ __pyx_t_1 = 0; goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":773 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":773 * ctypedef npy_cdouble complex_t * * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< @@ -18995,7 +18995,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__ return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":776 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":776 * return PyArray_MultiIterNew(1, a) * * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< @@ -19012,7 +19012,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 1); - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":777 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":777 * * cdef inline object PyArray_MultiIterNew2(a, b): * return PyArray_MultiIterNew(2, a, b) # <<<<<<<<<<<<<< @@ -19026,7 +19026,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__ __pyx_t_1 = 0; goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":776 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":776 * return PyArray_MultiIterNew(1, a) * * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< @@ -19045,7 +19045,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__ return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":779 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":779 * return PyArray_MultiIterNew(2, a, b) * * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< @@ -19062,7 +19062,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 1); - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":780 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":780 * * cdef inline object PyArray_MultiIterNew3(a, b, c): * return PyArray_MultiIterNew(3, a, b, c) # <<<<<<<<<<<<<< @@ -19076,7 +19076,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__ __pyx_t_1 = 0; goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":779 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":779 * return PyArray_MultiIterNew(2, a, b) * * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< @@ -19095,7 +19095,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__ return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":782 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":782 * return PyArray_MultiIterNew(3, a, b, c) * * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< @@ -19112,7 +19112,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 1); - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":783 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":783 * * cdef inline object PyArray_MultiIterNew4(a, b, c, d): * return PyArray_MultiIterNew(4, a, b, c, d) # <<<<<<<<<<<<<< @@ -19126,7 +19126,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__ __pyx_t_1 = 0; goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":782 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":782 * return PyArray_MultiIterNew(3, a, b, c) * * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< @@ -19145,7 +19145,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__ return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":785 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":785 * return PyArray_MultiIterNew(4, a, b, c, d) * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< @@ -19162,7 +19162,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 1); - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":786 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":786 * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<< @@ -19176,7 +19176,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__ __pyx_t_1 = 0; goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":785 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":785 * return PyArray_MultiIterNew(4, a, b, c, d) * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< @@ -19195,7 +19195,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__ return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":788 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":788 * return PyArray_MultiIterNew(5, a, b, c, d, e) * * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< @@ -19209,7 +19209,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ int __pyx_t_1; __Pyx_RefNannySetupContext("PyDataType_SHAPE", 1); - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":789 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":789 * * cdef inline tuple PyDataType_SHAPE(dtype d): * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< @@ -19219,7 +19219,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ __pyx_t_1 = PyDataType_HASSUBARRAY(__pyx_v_d); if (__pyx_t_1) { - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":790 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":790 * cdef inline tuple PyDataType_SHAPE(dtype d): * if PyDataType_HASSUBARRAY(d): * return d.subarray.shape # <<<<<<<<<<<<<< @@ -19231,7 +19231,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape); goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":789 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":789 * * cdef inline tuple PyDataType_SHAPE(dtype d): * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< @@ -19240,7 +19240,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ */ } - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":792 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":792 * return d.subarray.shape * else: * return () # <<<<<<<<<<<<<< @@ -19254,7 +19254,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ goto __pyx_L0; } - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":788 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":788 * return PyArray_MultiIterNew(5, a, b, c, d, e) * * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< @@ -19269,7 +19269,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":968 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":968 * int _import_umath() except -1 * * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< @@ -19283,7 +19283,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a const char *__pyx_filename = NULL; int __pyx_clineno = 0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":969 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":969 * * cdef inline void set_array_base(ndarray arr, object base): * Py_INCREF(base) # important to do this before stealing the reference below! # <<<<<<<<<<<<<< @@ -19292,7 +19292,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a */ Py_INCREF(__pyx_v_base); - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":970 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":970 * cdef inline void set_array_base(ndarray arr, object base): * Py_INCREF(base) # important to do this before stealing the reference below! * PyArray_SetBaseObject(arr, base) # <<<<<<<<<<<<<< @@ -19301,7 +19301,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a */ __pyx_t_1 = PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(2, 970, __pyx_L1_error) - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":968 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":968 * int _import_umath() except -1 * * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< @@ -19316,7 +19316,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a __pyx_L0:; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":972 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":972 * PyArray_SetBaseObject(arr, base) * * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< @@ -19331,7 +19331,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py int __pyx_t_1; __Pyx_RefNannySetupContext("get_array_base", 1); - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":973 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":973 * * cdef inline object get_array_base(ndarray arr): * base = PyArray_BASE(arr) # <<<<<<<<<<<<<< @@ -19340,7 +19340,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py */ __pyx_v_base = PyArray_BASE(__pyx_v_arr); - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":974 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":974 * cdef inline object get_array_base(ndarray arr): * base = PyArray_BASE(arr) * if base is NULL: # <<<<<<<<<<<<<< @@ -19350,7 +19350,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py __pyx_t_1 = (__pyx_v_base == NULL); if (__pyx_t_1) { - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":975 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":975 * base = PyArray_BASE(arr) * if base is NULL: * return None # <<<<<<<<<<<<<< @@ -19361,7 +19361,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":974 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":974 * cdef inline object get_array_base(ndarray arr): * base = PyArray_BASE(arr) * if base is NULL: # <<<<<<<<<<<<<< @@ -19370,7 +19370,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py */ } - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":976 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":976 * if base is NULL: * return None * return base # <<<<<<<<<<<<<< @@ -19382,7 +19382,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py __pyx_r = ((PyObject *)__pyx_v_base); goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":972 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":972 * PyArray_SetBaseObject(arr, base) * * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< @@ -19397,7 +19397,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":980 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":980 * # Versions of the import_* functions which are more suitable for * # Cython code. * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< @@ -19421,7 +19421,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { int __pyx_clineno = 0; __Pyx_RefNannySetupContext("import_array", 1); - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":981 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":981 * # Cython code. * cdef inline int import_array() except -1: * try: # <<<<<<<<<<<<<< @@ -19437,7 +19437,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":982 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":982 * cdef inline int import_array() except -1: * try: * __pyx_import_array() # <<<<<<<<<<<<<< @@ -19446,7 +19446,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { */ __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 982, __pyx_L3_error) - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":981 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":981 * # Cython code. * cdef inline int import_array() except -1: * try: # <<<<<<<<<<<<<< @@ -19460,7 +19460,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { goto __pyx_L8_try_end; __pyx_L3_error:; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":983 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":983 * try: * __pyx_import_array() * except Exception: # <<<<<<<<<<<<<< @@ -19475,7 +19475,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":984 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":984 * __pyx_import_array() * except Exception: * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< @@ -19490,7 +19490,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { } goto __pyx_L5_except_error; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":981 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":981 * # Cython code. * cdef inline int import_array() except -1: * try: # <<<<<<<<<<<<<< @@ -19506,7 +19506,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { __pyx_L8_try_end:; } - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":980 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":980 * # Versions of the import_* functions which are more suitable for * # Cython code. * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< @@ -19529,7 +19529,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":986 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":986 * raise ImportError("numpy.core.multiarray failed to import") * * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< @@ -19553,7 +19553,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { int __pyx_clineno = 0; __Pyx_RefNannySetupContext("import_umath", 1); - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":987 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":987 * * cdef inline int import_umath() except -1: * try: # <<<<<<<<<<<<<< @@ -19569,7 +19569,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":988 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":988 * cdef inline int import_umath() except -1: * try: * _import_umath() # <<<<<<<<<<<<<< @@ -19578,7 +19578,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { */ __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 988, __pyx_L3_error) - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":987 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":987 * * cdef inline int import_umath() except -1: * try: # <<<<<<<<<<<<<< @@ -19592,7 +19592,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { goto __pyx_L8_try_end; __pyx_L3_error:; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":989 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":989 * try: * _import_umath() * except Exception: # <<<<<<<<<<<<<< @@ -19607,7 +19607,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":990 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":990 * _import_umath() * except Exception: * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< @@ -19622,7 +19622,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { } goto __pyx_L5_except_error; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":987 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":987 * * cdef inline int import_umath() except -1: * try: # <<<<<<<<<<<<<< @@ -19638,7 +19638,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { __pyx_L8_try_end:; } - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":986 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":986 * raise ImportError("numpy.core.multiarray failed to import") * * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< @@ -19661,7 +19661,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":992 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":992 * raise ImportError("numpy.core.umath failed to import") * * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< @@ -19685,7 +19685,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { int __pyx_clineno = 0; __Pyx_RefNannySetupContext("import_ufunc", 1); - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":993 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":993 * * cdef inline int import_ufunc() except -1: * try: # <<<<<<<<<<<<<< @@ -19701,7 +19701,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":994 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":994 * cdef inline int import_ufunc() except -1: * try: * _import_umath() # <<<<<<<<<<<<<< @@ -19710,7 +19710,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { */ __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 994, __pyx_L3_error) - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":993 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":993 * * cdef inline int import_ufunc() except -1: * try: # <<<<<<<<<<<<<< @@ -19724,7 +19724,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { goto __pyx_L8_try_end; __pyx_L3_error:; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":995 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":995 * try: * _import_umath() * except Exception: # <<<<<<<<<<<<<< @@ -19739,7 +19739,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":996 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":996 * _import_umath() * except Exception: * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< @@ -19754,7 +19754,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { } goto __pyx_L5_except_error; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":993 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":993 * * cdef inline int import_ufunc() except -1: * try: # <<<<<<<<<<<<<< @@ -19770,7 +19770,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { __pyx_L8_try_end:; } - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":992 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":992 * raise ImportError("numpy.core.umath failed to import") * * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< @@ -19793,7 +19793,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":999 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":999 * * * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<< @@ -19804,7 +19804,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_obj) { int __pyx_r; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1011 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":1011 * bool * """ * return PyObject_TypeCheck(obj, &PyTimedeltaArrType_Type) # <<<<<<<<<<<<<< @@ -19814,7 +19814,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_ __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyTimedeltaArrType_Type)); goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":999 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":999 * * * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<< @@ -19827,7 +19827,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_ return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1014 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":1014 * * * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<< @@ -19838,7 +19838,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_ static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_obj) { int __pyx_r; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1026 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":1026 * bool * """ * return PyObject_TypeCheck(obj, &PyDatetimeArrType_Type) # <<<<<<<<<<<<<< @@ -19848,7 +19848,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_o __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyDatetimeArrType_Type)); goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1014 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":1014 * * * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<< @@ -19861,7 +19861,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_o return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1029 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":1029 * * * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<< @@ -19872,7 +19872,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_o static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject *__pyx_v_obj) { npy_datetime __pyx_r; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1036 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":1036 * also needed. That can be found using `get_datetime64_unit`. * """ * return (obj).obval # <<<<<<<<<<<<<< @@ -19882,7 +19882,7 @@ static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject * __pyx_r = ((PyDatetimeScalarObject *)__pyx_v_obj)->obval; goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1029 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":1029 * * * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<< @@ -19895,7 +19895,7 @@ static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject * return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1039 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":1039 * * * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<< @@ -19906,7 +19906,7 @@ static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject * static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject *__pyx_v_obj) { npy_timedelta __pyx_r; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1043 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":1043 * returns the int64 value underlying scalar numpy timedelta64 object * """ * return (obj).obval # <<<<<<<<<<<<<< @@ -19916,7 +19916,7 @@ static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject __pyx_r = ((PyTimedeltaScalarObject *)__pyx_v_obj)->obval; goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1039 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":1039 * * * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<< @@ -19929,7 +19929,7 @@ static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1046 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":1046 * * * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< @@ -19940,7 +19940,7 @@ static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObject *__pyx_v_obj) { NPY_DATETIMEUNIT __pyx_r; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1050 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":1050 * returns the unit part of the dtype for a numpy datetime64 object. * """ * return (obj).obmeta.base # <<<<<<<<<<<<<< @@ -19948,7 +19948,7 @@ static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObjec __pyx_r = ((NPY_DATETIMEUNIT)((PyDatetimeScalarObject *)__pyx_v_obj)->obmeta.base); goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1046 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":1046 * * * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< @@ -28633,7 +28633,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__8); __Pyx_GIVEREF(__pyx_tuple__8); - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":984 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":984 * __pyx_import_array() * except Exception: * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< @@ -28644,7 +28644,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__9); __Pyx_GIVEREF(__pyx_tuple__9); - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":990 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":990 * _import_umath() * except Exception: * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< diff --git a/mlsauce/ridge/_ridge.py b/mlsauce/ridge/_ridge.py index ff122b0..26e4728 100644 --- a/mlsauce/ridge/_ridge.py +++ b/mlsauce/ridge/_ridge.py @@ -4,8 +4,14 @@ from sklearn.base import BaseEstimator from sklearn.base import RegressorMixin from numpy.linalg import inv -from . import _ridgec as mo -from ..utils import get_beta +try: + from . import _ridgec as mo +except ImportError: + import pyximport + + pyximport.install() + import _ridgec as mo +from ..utils import get_beta if platform.system() in ("Linux", "Darwin"): import jax.numpy as jnp @@ -62,29 +68,36 @@ def fit(self, X, y, **kwargs): self: object. - """ + """ self.ym, centered_y = mo.center_response(y) self.xm = X.mean(axis=0) self.xsd = X.std(axis=0) - self.xsd[self.xsd == 0] = 1 # avoid division by zero + self.xsd[self.xsd == 0] = 1 # avoid division by zero X_ = (X - self.xm[None, :]) / self.xsd[None, :] - if self.backend == "cpu": - if (len(centered_y.shape) <= 1): + if self.backend == "cpu": + if len(centered_y.shape) <= 1: eye_term = np.sqrt(self.reg_lambda) * np.eye(X.shape[1]) X_ = np.row_stack((X_, eye_term)) y_ = np.concatenate((centered_y, np.zeros(X.shape[1]))) - #self.beta, _, _, _ = np.linalg.lstsq(X_, y_, rcond=None) - self.beta = get_beta(X_, y_) - else: - try: + # self.beta, _, _, _ = np.linalg.lstsq(X_, y_, rcond=None) + self.beta = get_beta(X_, y_) + else: + try: eye_term = np.sqrt(self.reg_lambda) * np.eye(X.shape[1]) X_ = np.row_stack((X_, eye_term)) - y_ = np.row_stack((centered_y, np.zeros((eye_term.shape[0], centered_y.shape[1])))) - #self.beta, _, _, _ = np.linalg.lstsq(X_, y_, rcond=None) - self.beta = get_beta(X_, y_) + y_ = np.row_stack( + ( + centered_y, + np.zeros((eye_term.shape[0], centered_y.shape[1])), + ) + ) + # self.beta, _, _, _ = np.linalg.lstsq(X_, y_, rcond=None) + self.beta = get_beta(X_, y_) except Exception: - x = inv(mo.crossprod(X_) + self.reg_lambda * np.eye(X_.shape[1])) + x = inv( + mo.crossprod(X_) + self.reg_lambda * np.eye(X_.shape[1]) + ) hat_matrix = mo.tcrossprod(x, X_) self.beta = mo.safe_sparse_dot(hat_matrix, centered_y) return self diff --git a/mlsauce/ridge/_ridgec.c b/mlsauce/ridge/_ridgec.c index c43a154..f086a4e 100644 --- a/mlsauce/ridge/_ridgec.c +++ b/mlsauce/ridge/_ridgec.c @@ -4,14 +4,14 @@ { "distutils": { "depends": [ - "/workspaces/codespaces-blank/mlsauce/venv/lib/python3.10/site-packages/numpy/core/include/numpy/arrayobject.h", - "/workspaces/codespaces-blank/mlsauce/venv/lib/python3.10/site-packages/numpy/core/include/numpy/arrayscalars.h", - "/workspaces/codespaces-blank/mlsauce/venv/lib/python3.10/site-packages/numpy/core/include/numpy/ndarrayobject.h", - "/workspaces/codespaces-blank/mlsauce/venv/lib/python3.10/site-packages/numpy/core/include/numpy/ndarraytypes.h", - "/workspaces/codespaces-blank/mlsauce/venv/lib/python3.10/site-packages/numpy/core/include/numpy/ufuncobject.h" + "/Users/t/Documents/Python_Packages/mlsauce/venv/lib/python3.11/site-packages/numpy/core/include/numpy/arrayobject.h", + "/Users/t/Documents/Python_Packages/mlsauce/venv/lib/python3.11/site-packages/numpy/core/include/numpy/arrayscalars.h", + "/Users/t/Documents/Python_Packages/mlsauce/venv/lib/python3.11/site-packages/numpy/core/include/numpy/ndarrayobject.h", + "/Users/t/Documents/Python_Packages/mlsauce/venv/lib/python3.11/site-packages/numpy/core/include/numpy/ndarraytypes.h", + "/Users/t/Documents/Python_Packages/mlsauce/venv/lib/python3.11/site-packages/numpy/core/include/numpy/ufuncobject.h" ], "include_dirs": [ - "/workspaces/codespaces-blank/mlsauce/venv/lib/python3.10/site-packages/numpy/core/include" + "/Users/t/Documents/Python_Packages/mlsauce/venv/lib/python3.11/site-packages/numpy/core/include" ], "library_dirs": [ "mlsauce/ridge/" @@ -1528,8 +1528,8 @@ static const char *__pyx_filename; static const char *__pyx_f[] = { "mlsauce/ridge/_ridgec.pyx", - "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd", - "venv/lib/python3.10/site-packages/Cython/Includes/cpython/type.pxd", + "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd", + "venv/lib/python3.11/site-packages/Cython/Includes/cpython/type.pxd", }; /* #### Code section: utility_code_proto_before_types ### */ /* ForceInitThreads.proto */ @@ -1539,7 +1539,7 @@ static const char *__pyx_f[] = { /* #### Code section: numeric_typedefs ### */ -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":730 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":730 * # in Cython to enable them only on the right systems. * * ctypedef npy_int8 int8_t # <<<<<<<<<<<<<< @@ -1548,7 +1548,7 @@ static const char *__pyx_f[] = { */ typedef npy_int8 __pyx_t_5numpy_int8_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":731 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":731 * * ctypedef npy_int8 int8_t * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<< @@ -1557,7 +1557,7 @@ typedef npy_int8 __pyx_t_5numpy_int8_t; */ typedef npy_int16 __pyx_t_5numpy_int16_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":732 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":732 * ctypedef npy_int8 int8_t * ctypedef npy_int16 int16_t * ctypedef npy_int32 int32_t # <<<<<<<<<<<<<< @@ -1566,7 +1566,7 @@ typedef npy_int16 __pyx_t_5numpy_int16_t; */ typedef npy_int32 __pyx_t_5numpy_int32_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":733 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":733 * ctypedef npy_int16 int16_t * ctypedef npy_int32 int32_t * ctypedef npy_int64 int64_t # <<<<<<<<<<<<<< @@ -1575,7 +1575,7 @@ typedef npy_int32 __pyx_t_5numpy_int32_t; */ typedef npy_int64 __pyx_t_5numpy_int64_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":737 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":737 * #ctypedef npy_int128 int128_t * * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<< @@ -1584,7 +1584,7 @@ typedef npy_int64 __pyx_t_5numpy_int64_t; */ typedef npy_uint8 __pyx_t_5numpy_uint8_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":738 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":738 * * ctypedef npy_uint8 uint8_t * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<< @@ -1593,7 +1593,7 @@ typedef npy_uint8 __pyx_t_5numpy_uint8_t; */ typedef npy_uint16 __pyx_t_5numpy_uint16_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":739 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":739 * ctypedef npy_uint8 uint8_t * ctypedef npy_uint16 uint16_t * ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<< @@ -1602,7 +1602,7 @@ typedef npy_uint16 __pyx_t_5numpy_uint16_t; */ typedef npy_uint32 __pyx_t_5numpy_uint32_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":740 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":740 * ctypedef npy_uint16 uint16_t * ctypedef npy_uint32 uint32_t * ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<< @@ -1611,7 +1611,7 @@ typedef npy_uint32 __pyx_t_5numpy_uint32_t; */ typedef npy_uint64 __pyx_t_5numpy_uint64_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":744 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":744 * #ctypedef npy_uint128 uint128_t * * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<< @@ -1620,7 +1620,7 @@ typedef npy_uint64 __pyx_t_5numpy_uint64_t; */ typedef npy_float32 __pyx_t_5numpy_float32_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":745 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":745 * * ctypedef npy_float32 float32_t * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<< @@ -1629,7 +1629,7 @@ typedef npy_float32 __pyx_t_5numpy_float32_t; */ typedef npy_float64 __pyx_t_5numpy_float64_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":754 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":754 * # The int types are mapped a bit surprising -- * # numpy.int corresponds to 'l' and numpy.long to 'q' * ctypedef npy_long int_t # <<<<<<<<<<<<<< @@ -1638,7 +1638,7 @@ typedef npy_float64 __pyx_t_5numpy_float64_t; */ typedef npy_long __pyx_t_5numpy_int_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":755 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":755 * # numpy.int corresponds to 'l' and numpy.long to 'q' * ctypedef npy_long int_t * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<< @@ -1647,7 +1647,7 @@ typedef npy_long __pyx_t_5numpy_int_t; */ typedef npy_longlong __pyx_t_5numpy_longlong_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":757 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":757 * ctypedef npy_longlong longlong_t * * ctypedef npy_ulong uint_t # <<<<<<<<<<<<<< @@ -1656,7 +1656,7 @@ typedef npy_longlong __pyx_t_5numpy_longlong_t; */ typedef npy_ulong __pyx_t_5numpy_uint_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":758 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":758 * * ctypedef npy_ulong uint_t * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<< @@ -1665,7 +1665,7 @@ typedef npy_ulong __pyx_t_5numpy_uint_t; */ typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":760 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":760 * ctypedef npy_ulonglong ulonglong_t * * ctypedef npy_intp intp_t # <<<<<<<<<<<<<< @@ -1674,7 +1674,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; */ typedef npy_intp __pyx_t_5numpy_intp_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":761 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":761 * * ctypedef npy_intp intp_t * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<< @@ -1683,7 +1683,7 @@ typedef npy_intp __pyx_t_5numpy_intp_t; */ typedef npy_uintp __pyx_t_5numpy_uintp_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":763 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":763 * ctypedef npy_uintp uintp_t * * ctypedef npy_double float_t # <<<<<<<<<<<<<< @@ -1692,7 +1692,7 @@ typedef npy_uintp __pyx_t_5numpy_uintp_t; */ typedef npy_double __pyx_t_5numpy_float_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":764 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":764 * * ctypedef npy_double float_t * ctypedef npy_double double_t # <<<<<<<<<<<<<< @@ -1701,7 +1701,7 @@ typedef npy_double __pyx_t_5numpy_float_t; */ typedef npy_double __pyx_t_5numpy_double_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":765 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":765 * ctypedef npy_double float_t * ctypedef npy_double double_t * ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<< @@ -1738,7 +1738,7 @@ static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(do /*--- Type declarations ---*/ -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":767 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":767 * ctypedef npy_longdouble longdouble_t * * ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<< @@ -1747,7 +1747,7 @@ static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(do */ typedef npy_cfloat __pyx_t_5numpy_cfloat_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":768 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":768 * * ctypedef npy_cfloat cfloat_t * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<< @@ -1756,7 +1756,7 @@ typedef npy_cfloat __pyx_t_5numpy_cfloat_t; */ typedef npy_cdouble __pyx_t_5numpy_cdouble_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":769 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":769 * ctypedef npy_cfloat cfloat_t * ctypedef npy_cdouble cdouble_t * ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<< @@ -1765,7 +1765,7 @@ typedef npy_cdouble __pyx_t_5numpy_cdouble_t; */ typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":771 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":771 * ctypedef npy_clongdouble clongdouble_t * * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<< @@ -3647,7 +3647,7 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { #define __pyx_codeobj__35 __pyx_mstate_global->__pyx_codeobj__35 /* #### Code section: module_code ### */ -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":245 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":245 * * @property * cdef inline PyObject* base(self) nogil: # <<<<<<<<<<<<<< @@ -3658,7 +3658,7 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { static CYTHON_INLINE PyObject *__pyx_f_5numpy_7ndarray_4base_base(PyArrayObject *__pyx_v_self) { PyObject *__pyx_r; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":248 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":248 * """Returns a borrowed reference to the object owning the data/memory. * """ * return PyArray_BASE(self) # <<<<<<<<<<<<<< @@ -3668,7 +3668,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_7ndarray_4base_base(PyArrayObject __pyx_r = PyArray_BASE(__pyx_v_self); goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":245 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":245 * * @property * cdef inline PyObject* base(self) nogil: # <<<<<<<<<<<<<< @@ -3681,7 +3681,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_7ndarray_4base_base(PyArrayObject return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":251 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":251 * * @property * cdef inline dtype descr(self): # <<<<<<<<<<<<<< @@ -3695,7 +3695,7 @@ static CYTHON_INLINE PyArray_Descr *__pyx_f_5numpy_7ndarray_5descr_descr(PyArray PyArray_Descr *__pyx_t_1; __Pyx_RefNannySetupContext("descr", 1); - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":254 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":254 * """Returns an owned reference to the dtype of the array. * """ * return PyArray_DESCR(self) # <<<<<<<<<<<<<< @@ -3708,7 +3708,7 @@ static CYTHON_INLINE PyArray_Descr *__pyx_f_5numpy_7ndarray_5descr_descr(PyArray __pyx_r = ((PyArray_Descr *)__pyx_t_1); goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":251 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":251 * * @property * cdef inline dtype descr(self): # <<<<<<<<<<<<<< @@ -3723,7 +3723,7 @@ static CYTHON_INLINE PyArray_Descr *__pyx_f_5numpy_7ndarray_5descr_descr(PyArray return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":257 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":257 * * @property * cdef inline int ndim(self) nogil: # <<<<<<<<<<<<<< @@ -3734,7 +3734,7 @@ static CYTHON_INLINE PyArray_Descr *__pyx_f_5numpy_7ndarray_5descr_descr(PyArray static CYTHON_INLINE int __pyx_f_5numpy_7ndarray_4ndim_ndim(PyArrayObject *__pyx_v_self) { int __pyx_r; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":260 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":260 * """Returns the number of dimensions in the array. * """ * return PyArray_NDIM(self) # <<<<<<<<<<<<<< @@ -3744,7 +3744,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_7ndarray_4ndim_ndim(PyArrayObject *__pyx __pyx_r = PyArray_NDIM(__pyx_v_self); goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":257 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":257 * * @property * cdef inline int ndim(self) nogil: # <<<<<<<<<<<<<< @@ -3757,7 +3757,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_7ndarray_4ndim_ndim(PyArrayObject *__pyx return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":263 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":263 * * @property * cdef inline npy_intp *shape(self) nogil: # <<<<<<<<<<<<<< @@ -3768,7 +3768,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_7ndarray_4ndim_ndim(PyArrayObject *__pyx static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_5shape_shape(PyArrayObject *__pyx_v_self) { npy_intp *__pyx_r; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":268 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":268 * Can return NULL for 0-dimensional arrays. * """ * return PyArray_DIMS(self) # <<<<<<<<<<<<<< @@ -3778,7 +3778,7 @@ static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_5shape_shape(PyArrayObjec __pyx_r = PyArray_DIMS(__pyx_v_self); goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":263 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":263 * * @property * cdef inline npy_intp *shape(self) nogil: # <<<<<<<<<<<<<< @@ -3791,7 +3791,7 @@ static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_5shape_shape(PyArrayObjec return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":271 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":271 * * @property * cdef inline npy_intp *strides(self) nogil: # <<<<<<<<<<<<<< @@ -3802,7 +3802,7 @@ static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_5shape_shape(PyArrayObjec static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_7strides_strides(PyArrayObject *__pyx_v_self) { npy_intp *__pyx_r; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":275 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":275 * The number of elements matches the number of dimensions of the array (ndim). * """ * return PyArray_STRIDES(self) # <<<<<<<<<<<<<< @@ -3812,7 +3812,7 @@ static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_7strides_strides(PyArrayO __pyx_r = PyArray_STRIDES(__pyx_v_self); goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":271 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":271 * * @property * cdef inline npy_intp *strides(self) nogil: # <<<<<<<<<<<<<< @@ -3825,7 +3825,7 @@ static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_7strides_strides(PyArrayO return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":278 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":278 * * @property * cdef inline npy_intp size(self) nogil: # <<<<<<<<<<<<<< @@ -3836,7 +3836,7 @@ static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_7strides_strides(PyArrayO static CYTHON_INLINE npy_intp __pyx_f_5numpy_7ndarray_4size_size(PyArrayObject *__pyx_v_self) { npy_intp __pyx_r; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":281 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":281 * """Returns the total size (in number of elements) of the array. * """ * return PyArray_SIZE(self) # <<<<<<<<<<<<<< @@ -3846,7 +3846,7 @@ static CYTHON_INLINE npy_intp __pyx_f_5numpy_7ndarray_4size_size(PyArrayObject * __pyx_r = PyArray_SIZE(__pyx_v_self); goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":278 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":278 * * @property * cdef inline npy_intp size(self) nogil: # <<<<<<<<<<<<<< @@ -3859,7 +3859,7 @@ static CYTHON_INLINE npy_intp __pyx_f_5numpy_7ndarray_4size_size(PyArrayObject * return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":284 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":284 * * @property * cdef inline char* data(self) nogil: # <<<<<<<<<<<<<< @@ -3870,7 +3870,7 @@ static CYTHON_INLINE npy_intp __pyx_f_5numpy_7ndarray_4size_size(PyArrayObject * static CYTHON_INLINE char *__pyx_f_5numpy_7ndarray_4data_data(PyArrayObject *__pyx_v_self) { char *__pyx_r; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":290 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":290 * of `PyArray_DATA()` instead, which returns a 'void*'. * """ * return PyArray_BYTES(self) # <<<<<<<<<<<<<< @@ -3880,7 +3880,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy_7ndarray_4data_data(PyArrayObject *__p __pyx_r = PyArray_BYTES(__pyx_v_self); goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":284 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":284 * * @property * cdef inline char* data(self) nogil: # <<<<<<<<<<<<<< @@ -3893,7 +3893,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy_7ndarray_4data_data(PyArrayObject *__p return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":773 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":773 * ctypedef npy_cdouble complex_t * * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< @@ -3910,7 +3910,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 1); - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":774 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":774 * * cdef inline object PyArray_MultiIterNew1(a): * return PyArray_MultiIterNew(1, a) # <<<<<<<<<<<<<< @@ -3924,7 +3924,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__ __pyx_t_1 = 0; goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":773 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":773 * ctypedef npy_cdouble complex_t * * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< @@ -3943,7 +3943,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__ return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":776 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":776 * return PyArray_MultiIterNew(1, a) * * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< @@ -3960,7 +3960,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 1); - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":777 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":777 * * cdef inline object PyArray_MultiIterNew2(a, b): * return PyArray_MultiIterNew(2, a, b) # <<<<<<<<<<<<<< @@ -3974,7 +3974,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__ __pyx_t_1 = 0; goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":776 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":776 * return PyArray_MultiIterNew(1, a) * * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< @@ -3993,7 +3993,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__ return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":779 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":779 * return PyArray_MultiIterNew(2, a, b) * * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< @@ -4010,7 +4010,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 1); - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":780 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":780 * * cdef inline object PyArray_MultiIterNew3(a, b, c): * return PyArray_MultiIterNew(3, a, b, c) # <<<<<<<<<<<<<< @@ -4024,7 +4024,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__ __pyx_t_1 = 0; goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":779 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":779 * return PyArray_MultiIterNew(2, a, b) * * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< @@ -4043,7 +4043,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__ return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":782 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":782 * return PyArray_MultiIterNew(3, a, b, c) * * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< @@ -4060,7 +4060,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 1); - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":783 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":783 * * cdef inline object PyArray_MultiIterNew4(a, b, c, d): * return PyArray_MultiIterNew(4, a, b, c, d) # <<<<<<<<<<<<<< @@ -4074,7 +4074,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__ __pyx_t_1 = 0; goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":782 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":782 * return PyArray_MultiIterNew(3, a, b, c) * * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< @@ -4093,7 +4093,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__ return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":785 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":785 * return PyArray_MultiIterNew(4, a, b, c, d) * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< @@ -4110,7 +4110,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 1); - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":786 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":786 * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<< @@ -4124,7 +4124,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__ __pyx_t_1 = 0; goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":785 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":785 * return PyArray_MultiIterNew(4, a, b, c, d) * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< @@ -4143,7 +4143,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__ return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":788 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":788 * return PyArray_MultiIterNew(5, a, b, c, d, e) * * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< @@ -4157,7 +4157,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ int __pyx_t_1; __Pyx_RefNannySetupContext("PyDataType_SHAPE", 1); - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":789 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":789 * * cdef inline tuple PyDataType_SHAPE(dtype d): * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< @@ -4167,7 +4167,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ __pyx_t_1 = PyDataType_HASSUBARRAY(__pyx_v_d); if (__pyx_t_1) { - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":790 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":790 * cdef inline tuple PyDataType_SHAPE(dtype d): * if PyDataType_HASSUBARRAY(d): * return d.subarray.shape # <<<<<<<<<<<<<< @@ -4179,7 +4179,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape); goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":789 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":789 * * cdef inline tuple PyDataType_SHAPE(dtype d): * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< @@ -4188,7 +4188,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ */ } - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":792 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":792 * return d.subarray.shape * else: * return () # <<<<<<<<<<<<<< @@ -4202,7 +4202,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ goto __pyx_L0; } - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":788 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":788 * return PyArray_MultiIterNew(5, a, b, c, d, e) * * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< @@ -4217,7 +4217,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":968 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":968 * int _import_umath() except -1 * * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< @@ -4231,7 +4231,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a const char *__pyx_filename = NULL; int __pyx_clineno = 0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":969 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":969 * * cdef inline void set_array_base(ndarray arr, object base): * Py_INCREF(base) # important to do this before stealing the reference below! # <<<<<<<<<<<<<< @@ -4240,7 +4240,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a */ Py_INCREF(__pyx_v_base); - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":970 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":970 * cdef inline void set_array_base(ndarray arr, object base): * Py_INCREF(base) # important to do this before stealing the reference below! * PyArray_SetBaseObject(arr, base) # <<<<<<<<<<<<<< @@ -4249,7 +4249,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a */ __pyx_t_1 = PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 970, __pyx_L1_error) - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":968 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":968 * int _import_umath() except -1 * * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< @@ -4264,7 +4264,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a __pyx_L0:; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":972 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":972 * PyArray_SetBaseObject(arr, base) * * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< @@ -4279,7 +4279,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py int __pyx_t_1; __Pyx_RefNannySetupContext("get_array_base", 1); - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":973 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":973 * * cdef inline object get_array_base(ndarray arr): * base = PyArray_BASE(arr) # <<<<<<<<<<<<<< @@ -4288,7 +4288,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py */ __pyx_v_base = PyArray_BASE(__pyx_v_arr); - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":974 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":974 * cdef inline object get_array_base(ndarray arr): * base = PyArray_BASE(arr) * if base is NULL: # <<<<<<<<<<<<<< @@ -4298,7 +4298,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py __pyx_t_1 = (__pyx_v_base == NULL); if (__pyx_t_1) { - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":975 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":975 * base = PyArray_BASE(arr) * if base is NULL: * return None # <<<<<<<<<<<<<< @@ -4309,7 +4309,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":974 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":974 * cdef inline object get_array_base(ndarray arr): * base = PyArray_BASE(arr) * if base is NULL: # <<<<<<<<<<<<<< @@ -4318,7 +4318,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py */ } - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":976 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":976 * if base is NULL: * return None * return base # <<<<<<<<<<<<<< @@ -4330,7 +4330,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py __pyx_r = ((PyObject *)__pyx_v_base); goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":972 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":972 * PyArray_SetBaseObject(arr, base) * * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< @@ -4345,7 +4345,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":980 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":980 * # Versions of the import_* functions which are more suitable for * # Cython code. * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< @@ -4369,7 +4369,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { int __pyx_clineno = 0; __Pyx_RefNannySetupContext("import_array", 1); - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":981 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":981 * # Cython code. * cdef inline int import_array() except -1: * try: # <<<<<<<<<<<<<< @@ -4385,7 +4385,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":982 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":982 * cdef inline int import_array() except -1: * try: * __pyx_import_array() # <<<<<<<<<<<<<< @@ -4394,7 +4394,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { */ __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 982, __pyx_L3_error) - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":981 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":981 * # Cython code. * cdef inline int import_array() except -1: * try: # <<<<<<<<<<<<<< @@ -4408,7 +4408,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { goto __pyx_L8_try_end; __pyx_L3_error:; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":983 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":983 * try: * __pyx_import_array() * except Exception: # <<<<<<<<<<<<<< @@ -4423,7 +4423,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":984 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":984 * __pyx_import_array() * except Exception: * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< @@ -4438,7 +4438,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { } goto __pyx_L5_except_error; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":981 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":981 * # Cython code. * cdef inline int import_array() except -1: * try: # <<<<<<<<<<<<<< @@ -4454,7 +4454,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { __pyx_L8_try_end:; } - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":980 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":980 * # Versions of the import_* functions which are more suitable for * # Cython code. * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< @@ -4477,7 +4477,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":986 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":986 * raise ImportError("numpy.core.multiarray failed to import") * * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< @@ -4501,7 +4501,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { int __pyx_clineno = 0; __Pyx_RefNannySetupContext("import_umath", 1); - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":987 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":987 * * cdef inline int import_umath() except -1: * try: # <<<<<<<<<<<<<< @@ -4517,7 +4517,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":988 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":988 * cdef inline int import_umath() except -1: * try: * _import_umath() # <<<<<<<<<<<<<< @@ -4526,7 +4526,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { */ __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 988, __pyx_L3_error) - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":987 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":987 * * cdef inline int import_umath() except -1: * try: # <<<<<<<<<<<<<< @@ -4540,7 +4540,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { goto __pyx_L8_try_end; __pyx_L3_error:; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":989 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":989 * try: * _import_umath() * except Exception: # <<<<<<<<<<<<<< @@ -4555,7 +4555,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":990 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":990 * _import_umath() * except Exception: * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< @@ -4570,7 +4570,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { } goto __pyx_L5_except_error; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":987 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":987 * * cdef inline int import_umath() except -1: * try: # <<<<<<<<<<<<<< @@ -4586,7 +4586,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { __pyx_L8_try_end:; } - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":986 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":986 * raise ImportError("numpy.core.multiarray failed to import") * * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< @@ -4609,7 +4609,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":992 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":992 * raise ImportError("numpy.core.umath failed to import") * * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< @@ -4633,7 +4633,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { int __pyx_clineno = 0; __Pyx_RefNannySetupContext("import_ufunc", 1); - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":993 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":993 * * cdef inline int import_ufunc() except -1: * try: # <<<<<<<<<<<<<< @@ -4649,7 +4649,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":994 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":994 * cdef inline int import_ufunc() except -1: * try: * _import_umath() # <<<<<<<<<<<<<< @@ -4658,7 +4658,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { */ __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 994, __pyx_L3_error) - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":993 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":993 * * cdef inline int import_ufunc() except -1: * try: # <<<<<<<<<<<<<< @@ -4672,7 +4672,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { goto __pyx_L8_try_end; __pyx_L3_error:; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":995 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":995 * try: * _import_umath() * except Exception: # <<<<<<<<<<<<<< @@ -4687,7 +4687,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":996 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":996 * _import_umath() * except Exception: * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< @@ -4702,7 +4702,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { } goto __pyx_L5_except_error; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":993 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":993 * * cdef inline int import_ufunc() except -1: * try: # <<<<<<<<<<<<<< @@ -4718,7 +4718,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { __pyx_L8_try_end:; } - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":992 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":992 * raise ImportError("numpy.core.umath failed to import") * * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< @@ -4741,7 +4741,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":999 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":999 * * * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<< @@ -4752,7 +4752,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_obj) { int __pyx_r; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1011 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":1011 * bool * """ * return PyObject_TypeCheck(obj, &PyTimedeltaArrType_Type) # <<<<<<<<<<<<<< @@ -4762,7 +4762,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_ __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyTimedeltaArrType_Type)); goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":999 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":999 * * * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<< @@ -4775,7 +4775,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_ return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1014 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":1014 * * * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<< @@ -4786,7 +4786,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_ static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_obj) { int __pyx_r; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1026 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":1026 * bool * """ * return PyObject_TypeCheck(obj, &PyDatetimeArrType_Type) # <<<<<<<<<<<<<< @@ -4796,7 +4796,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_o __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyDatetimeArrType_Type)); goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1014 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":1014 * * * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<< @@ -4809,7 +4809,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_o return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1029 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":1029 * * * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<< @@ -4820,7 +4820,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_o static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject *__pyx_v_obj) { npy_datetime __pyx_r; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1036 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":1036 * also needed. That can be found using `get_datetime64_unit`. * """ * return (obj).obval # <<<<<<<<<<<<<< @@ -4830,7 +4830,7 @@ static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject * __pyx_r = ((PyDatetimeScalarObject *)__pyx_v_obj)->obval; goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1029 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":1029 * * * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<< @@ -4843,7 +4843,7 @@ static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject * return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1039 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":1039 * * * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<< @@ -4854,7 +4854,7 @@ static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject * static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject *__pyx_v_obj) { npy_timedelta __pyx_r; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1043 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":1043 * returns the int64 value underlying scalar numpy timedelta64 object * """ * return (obj).obval # <<<<<<<<<<<<<< @@ -4864,7 +4864,7 @@ static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject __pyx_r = ((PyTimedeltaScalarObject *)__pyx_v_obj)->obval; goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1039 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":1039 * * * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<< @@ -4877,7 +4877,7 @@ static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1046 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":1046 * * * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< @@ -4888,7 +4888,7 @@ static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObject *__pyx_v_obj) { NPY_DATETIMEUNIT __pyx_r; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1050 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":1050 * returns the unit part of the dtype for a numpy datetime64 object. * """ * return (obj).obmeta.base # <<<<<<<<<<<<<< @@ -4896,7 +4896,7 @@ static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObjec __pyx_r = ((NPY_DATETIMEUNIT)((PyDatetimeScalarObject *)__pyx_v_obj)->obmeta.base); goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1046 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":1046 * * * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< @@ -10402,7 +10402,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":984 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":984 * __pyx_import_array() * except Exception: * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< @@ -10413,7 +10413,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple_); __Pyx_GIVEREF(__pyx_tuple_); - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":990 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":990 * _import_umath() * except Exception: * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< diff --git a/mlsauce/stump/_stump_classifier.py b/mlsauce/stump/_stump_classifier.py index c8a151c..88050c6 100644 --- a/mlsauce/stump/_stump_classifier.py +++ b/mlsauce/stump/_stump_classifier.py @@ -1,7 +1,13 @@ import numpy as np from sklearn.base import BaseEstimator from sklearn.base import ClassifierMixin -from . import _stumpc as stumpc +try: + from . import _stumpc as stumpc +except ImportError: + import pyximport + + pyximport.install() + import _stumpc as stumpc class StumpClassifier(BaseEstimator, ClassifierMixin): @@ -52,7 +58,7 @@ def fit(self, X, y, sample_weight=None, **kwargs): sample_weight=np.ravel(sample_weight, order="C"), bins=self.bins, ) - self.n_classes_ = len(np.unique(y)) # for compatibility with sklearn + self.n_classes_ = len(np.unique(y)) # for compatibility with sklearn return self def predict(self, X, **kwargs): diff --git a/mlsauce/stump/_stumpc.c b/mlsauce/stump/_stumpc.c index abaef69..15ee11d 100644 --- a/mlsauce/stump/_stumpc.c +++ b/mlsauce/stump/_stumpc.c @@ -4,14 +4,14 @@ { "distutils": { "depends": [ - "/workspaces/codespaces-blank/mlsauce/venv/lib/python3.10/site-packages/numpy/core/include/numpy/arrayobject.h", - "/workspaces/codespaces-blank/mlsauce/venv/lib/python3.10/site-packages/numpy/core/include/numpy/arrayscalars.h", - "/workspaces/codespaces-blank/mlsauce/venv/lib/python3.10/site-packages/numpy/core/include/numpy/ndarrayobject.h", - "/workspaces/codespaces-blank/mlsauce/venv/lib/python3.10/site-packages/numpy/core/include/numpy/ndarraytypes.h", - "/workspaces/codespaces-blank/mlsauce/venv/lib/python3.10/site-packages/numpy/core/include/numpy/ufuncobject.h" + "/Users/t/Documents/Python_Packages/mlsauce/venv/lib/python3.11/site-packages/numpy/core/include/numpy/arrayobject.h", + "/Users/t/Documents/Python_Packages/mlsauce/venv/lib/python3.11/site-packages/numpy/core/include/numpy/arrayscalars.h", + "/Users/t/Documents/Python_Packages/mlsauce/venv/lib/python3.11/site-packages/numpy/core/include/numpy/ndarrayobject.h", + "/Users/t/Documents/Python_Packages/mlsauce/venv/lib/python3.11/site-packages/numpy/core/include/numpy/ndarraytypes.h", + "/Users/t/Documents/Python_Packages/mlsauce/venv/lib/python3.11/site-packages/numpy/core/include/numpy/ufuncobject.h" ], "include_dirs": [ - "/workspaces/codespaces-blank/mlsauce/venv/lib/python3.10/site-packages/numpy/core/include" + "/Users/t/Documents/Python_Packages/mlsauce/venv/lib/python3.11/site-packages/numpy/core/include" ], "library_dirs": [ "mlsauce/stump/" @@ -1532,8 +1532,8 @@ static const char *__pyx_filename; static const char *__pyx_f[] = { "mlsauce/stump/_stumpc.pyx", "", - "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd", - "venv/lib/python3.10/site-packages/Cython/Includes/cpython/type.pxd", + "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd", + "venv/lib/python3.11/site-packages/Cython/Includes/cpython/type.pxd", }; /* #### Code section: utility_code_proto_before_types ### */ /* ForceInitThreads.proto */ @@ -1679,7 +1679,7 @@ typedef struct { /* #### Code section: numeric_typedefs ### */ -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":730 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":730 * # in Cython to enable them only on the right systems. * * ctypedef npy_int8 int8_t # <<<<<<<<<<<<<< @@ -1688,7 +1688,7 @@ typedef struct { */ typedef npy_int8 __pyx_t_5numpy_int8_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":731 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":731 * * ctypedef npy_int8 int8_t * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<< @@ -1697,7 +1697,7 @@ typedef npy_int8 __pyx_t_5numpy_int8_t; */ typedef npy_int16 __pyx_t_5numpy_int16_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":732 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":732 * ctypedef npy_int8 int8_t * ctypedef npy_int16 int16_t * ctypedef npy_int32 int32_t # <<<<<<<<<<<<<< @@ -1706,7 +1706,7 @@ typedef npy_int16 __pyx_t_5numpy_int16_t; */ typedef npy_int32 __pyx_t_5numpy_int32_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":733 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":733 * ctypedef npy_int16 int16_t * ctypedef npy_int32 int32_t * ctypedef npy_int64 int64_t # <<<<<<<<<<<<<< @@ -1715,7 +1715,7 @@ typedef npy_int32 __pyx_t_5numpy_int32_t; */ typedef npy_int64 __pyx_t_5numpy_int64_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":737 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":737 * #ctypedef npy_int128 int128_t * * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<< @@ -1724,7 +1724,7 @@ typedef npy_int64 __pyx_t_5numpy_int64_t; */ typedef npy_uint8 __pyx_t_5numpy_uint8_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":738 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":738 * * ctypedef npy_uint8 uint8_t * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<< @@ -1733,7 +1733,7 @@ typedef npy_uint8 __pyx_t_5numpy_uint8_t; */ typedef npy_uint16 __pyx_t_5numpy_uint16_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":739 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":739 * ctypedef npy_uint8 uint8_t * ctypedef npy_uint16 uint16_t * ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<< @@ -1742,7 +1742,7 @@ typedef npy_uint16 __pyx_t_5numpy_uint16_t; */ typedef npy_uint32 __pyx_t_5numpy_uint32_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":740 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":740 * ctypedef npy_uint16 uint16_t * ctypedef npy_uint32 uint32_t * ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<< @@ -1751,7 +1751,7 @@ typedef npy_uint32 __pyx_t_5numpy_uint32_t; */ typedef npy_uint64 __pyx_t_5numpy_uint64_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":744 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":744 * #ctypedef npy_uint128 uint128_t * * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<< @@ -1760,7 +1760,7 @@ typedef npy_uint64 __pyx_t_5numpy_uint64_t; */ typedef npy_float32 __pyx_t_5numpy_float32_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":745 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":745 * * ctypedef npy_float32 float32_t * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<< @@ -1769,7 +1769,7 @@ typedef npy_float32 __pyx_t_5numpy_float32_t; */ typedef npy_float64 __pyx_t_5numpy_float64_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":754 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":754 * # The int types are mapped a bit surprising -- * # numpy.int corresponds to 'l' and numpy.long to 'q' * ctypedef npy_long int_t # <<<<<<<<<<<<<< @@ -1778,7 +1778,7 @@ typedef npy_float64 __pyx_t_5numpy_float64_t; */ typedef npy_long __pyx_t_5numpy_int_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":755 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":755 * # numpy.int corresponds to 'l' and numpy.long to 'q' * ctypedef npy_long int_t * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<< @@ -1787,7 +1787,7 @@ typedef npy_long __pyx_t_5numpy_int_t; */ typedef npy_longlong __pyx_t_5numpy_longlong_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":757 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":757 * ctypedef npy_longlong longlong_t * * ctypedef npy_ulong uint_t # <<<<<<<<<<<<<< @@ -1796,7 +1796,7 @@ typedef npy_longlong __pyx_t_5numpy_longlong_t; */ typedef npy_ulong __pyx_t_5numpy_uint_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":758 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":758 * * ctypedef npy_ulong uint_t * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<< @@ -1805,7 +1805,7 @@ typedef npy_ulong __pyx_t_5numpy_uint_t; */ typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":760 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":760 * ctypedef npy_ulonglong ulonglong_t * * ctypedef npy_intp intp_t # <<<<<<<<<<<<<< @@ -1814,7 +1814,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; */ typedef npy_intp __pyx_t_5numpy_intp_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":761 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":761 * * ctypedef npy_intp intp_t * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<< @@ -1823,7 +1823,7 @@ typedef npy_intp __pyx_t_5numpy_intp_t; */ typedef npy_uintp __pyx_t_5numpy_uintp_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":763 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":763 * ctypedef npy_uintp uintp_t * * ctypedef npy_double float_t # <<<<<<<<<<<<<< @@ -1832,7 +1832,7 @@ typedef npy_uintp __pyx_t_5numpy_uintp_t; */ typedef npy_double __pyx_t_5numpy_float_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":764 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":764 * * ctypedef npy_double float_t * ctypedef npy_double double_t # <<<<<<<<<<<<<< @@ -1841,7 +1841,7 @@ typedef npy_double __pyx_t_5numpy_float_t; */ typedef npy_double __pyx_t_5numpy_double_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":765 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":765 * ctypedef npy_double float_t * ctypedef npy_double double_t * ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<< @@ -1882,7 +1882,7 @@ struct __pyx_MemviewEnum_obj; struct __pyx_memoryview_obj; struct __pyx_memoryviewslice_obj; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":767 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":767 * ctypedef npy_longdouble longdouble_t * * ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<< @@ -1891,7 +1891,7 @@ struct __pyx_memoryviewslice_obj; */ typedef npy_cfloat __pyx_t_5numpy_cfloat_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":768 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":768 * * ctypedef npy_cfloat cfloat_t * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<< @@ -1900,7 +1900,7 @@ typedef npy_cfloat __pyx_t_5numpy_cfloat_t; */ typedef npy_cdouble __pyx_t_5numpy_cdouble_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":769 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":769 * ctypedef npy_cfloat cfloat_t * ctypedef npy_cdouble cdouble_t * ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<< @@ -1909,7 +1909,7 @@ typedef npy_cdouble __pyx_t_5numpy_cdouble_t; */ typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t; -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":771 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":771 * ctypedef npy_clongdouble clongdouble_t * * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<< @@ -18338,7 +18338,7 @@ static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *__ return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":245 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":245 * * @property * cdef inline PyObject* base(self) nogil: # <<<<<<<<<<<<<< @@ -18349,7 +18349,7 @@ static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *__ static CYTHON_INLINE PyObject *__pyx_f_5numpy_7ndarray_4base_base(PyArrayObject *__pyx_v_self) { PyObject *__pyx_r; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":248 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":248 * """Returns a borrowed reference to the object owning the data/memory. * """ * return PyArray_BASE(self) # <<<<<<<<<<<<<< @@ -18359,7 +18359,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_7ndarray_4base_base(PyArrayObject __pyx_r = PyArray_BASE(__pyx_v_self); goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":245 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":245 * * @property * cdef inline PyObject* base(self) nogil: # <<<<<<<<<<<<<< @@ -18372,7 +18372,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_7ndarray_4base_base(PyArrayObject return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":251 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":251 * * @property * cdef inline dtype descr(self): # <<<<<<<<<<<<<< @@ -18386,7 +18386,7 @@ static CYTHON_INLINE PyArray_Descr *__pyx_f_5numpy_7ndarray_5descr_descr(PyArray PyArray_Descr *__pyx_t_1; __Pyx_RefNannySetupContext("descr", 1); - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":254 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":254 * """Returns an owned reference to the dtype of the array. * """ * return PyArray_DESCR(self) # <<<<<<<<<<<<<< @@ -18399,7 +18399,7 @@ static CYTHON_INLINE PyArray_Descr *__pyx_f_5numpy_7ndarray_5descr_descr(PyArray __pyx_r = ((PyArray_Descr *)__pyx_t_1); goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":251 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":251 * * @property * cdef inline dtype descr(self): # <<<<<<<<<<<<<< @@ -18414,7 +18414,7 @@ static CYTHON_INLINE PyArray_Descr *__pyx_f_5numpy_7ndarray_5descr_descr(PyArray return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":257 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":257 * * @property * cdef inline int ndim(self) nogil: # <<<<<<<<<<<<<< @@ -18425,7 +18425,7 @@ static CYTHON_INLINE PyArray_Descr *__pyx_f_5numpy_7ndarray_5descr_descr(PyArray static CYTHON_INLINE int __pyx_f_5numpy_7ndarray_4ndim_ndim(PyArrayObject *__pyx_v_self) { int __pyx_r; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":260 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":260 * """Returns the number of dimensions in the array. * """ * return PyArray_NDIM(self) # <<<<<<<<<<<<<< @@ -18435,7 +18435,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_7ndarray_4ndim_ndim(PyArrayObject *__pyx __pyx_r = PyArray_NDIM(__pyx_v_self); goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":257 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":257 * * @property * cdef inline int ndim(self) nogil: # <<<<<<<<<<<<<< @@ -18448,7 +18448,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_7ndarray_4ndim_ndim(PyArrayObject *__pyx return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":263 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":263 * * @property * cdef inline npy_intp *shape(self) nogil: # <<<<<<<<<<<<<< @@ -18459,7 +18459,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_7ndarray_4ndim_ndim(PyArrayObject *__pyx static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_5shape_shape(PyArrayObject *__pyx_v_self) { npy_intp *__pyx_r; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":268 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":268 * Can return NULL for 0-dimensional arrays. * """ * return PyArray_DIMS(self) # <<<<<<<<<<<<<< @@ -18469,7 +18469,7 @@ static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_5shape_shape(PyArrayObjec __pyx_r = PyArray_DIMS(__pyx_v_self); goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":263 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":263 * * @property * cdef inline npy_intp *shape(self) nogil: # <<<<<<<<<<<<<< @@ -18482,7 +18482,7 @@ static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_5shape_shape(PyArrayObjec return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":271 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":271 * * @property * cdef inline npy_intp *strides(self) nogil: # <<<<<<<<<<<<<< @@ -18493,7 +18493,7 @@ static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_5shape_shape(PyArrayObjec static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_7strides_strides(PyArrayObject *__pyx_v_self) { npy_intp *__pyx_r; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":275 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":275 * The number of elements matches the number of dimensions of the array (ndim). * """ * return PyArray_STRIDES(self) # <<<<<<<<<<<<<< @@ -18503,7 +18503,7 @@ static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_7strides_strides(PyArrayO __pyx_r = PyArray_STRIDES(__pyx_v_self); goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":271 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":271 * * @property * cdef inline npy_intp *strides(self) nogil: # <<<<<<<<<<<<<< @@ -18516,7 +18516,7 @@ static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_7strides_strides(PyArrayO return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":278 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":278 * * @property * cdef inline npy_intp size(self) nogil: # <<<<<<<<<<<<<< @@ -18527,7 +18527,7 @@ static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_7strides_strides(PyArrayO static CYTHON_INLINE npy_intp __pyx_f_5numpy_7ndarray_4size_size(PyArrayObject *__pyx_v_self) { npy_intp __pyx_r; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":281 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":281 * """Returns the total size (in number of elements) of the array. * """ * return PyArray_SIZE(self) # <<<<<<<<<<<<<< @@ -18537,7 +18537,7 @@ static CYTHON_INLINE npy_intp __pyx_f_5numpy_7ndarray_4size_size(PyArrayObject * __pyx_r = PyArray_SIZE(__pyx_v_self); goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":278 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":278 * * @property * cdef inline npy_intp size(self) nogil: # <<<<<<<<<<<<<< @@ -18550,7 +18550,7 @@ static CYTHON_INLINE npy_intp __pyx_f_5numpy_7ndarray_4size_size(PyArrayObject * return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":284 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":284 * * @property * cdef inline char* data(self) nogil: # <<<<<<<<<<<<<< @@ -18561,7 +18561,7 @@ static CYTHON_INLINE npy_intp __pyx_f_5numpy_7ndarray_4size_size(PyArrayObject * static CYTHON_INLINE char *__pyx_f_5numpy_7ndarray_4data_data(PyArrayObject *__pyx_v_self) { char *__pyx_r; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":290 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":290 * of `PyArray_DATA()` instead, which returns a 'void*'. * """ * return PyArray_BYTES(self) # <<<<<<<<<<<<<< @@ -18571,7 +18571,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy_7ndarray_4data_data(PyArrayObject *__p __pyx_r = PyArray_BYTES(__pyx_v_self); goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":284 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":284 * * @property * cdef inline char* data(self) nogil: # <<<<<<<<<<<<<< @@ -18584,7 +18584,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy_7ndarray_4data_data(PyArrayObject *__p return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":773 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":773 * ctypedef npy_cdouble complex_t * * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< @@ -18601,7 +18601,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 1); - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":774 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":774 * * cdef inline object PyArray_MultiIterNew1(a): * return PyArray_MultiIterNew(1, a) # <<<<<<<<<<<<<< @@ -18615,7 +18615,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__ __pyx_t_1 = 0; goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":773 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":773 * ctypedef npy_cdouble complex_t * * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< @@ -18634,7 +18634,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__ return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":776 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":776 * return PyArray_MultiIterNew(1, a) * * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< @@ -18651,7 +18651,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 1); - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":777 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":777 * * cdef inline object PyArray_MultiIterNew2(a, b): * return PyArray_MultiIterNew(2, a, b) # <<<<<<<<<<<<<< @@ -18665,7 +18665,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__ __pyx_t_1 = 0; goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":776 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":776 * return PyArray_MultiIterNew(1, a) * * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< @@ -18684,7 +18684,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__ return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":779 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":779 * return PyArray_MultiIterNew(2, a, b) * * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< @@ -18701,7 +18701,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 1); - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":780 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":780 * * cdef inline object PyArray_MultiIterNew3(a, b, c): * return PyArray_MultiIterNew(3, a, b, c) # <<<<<<<<<<<<<< @@ -18715,7 +18715,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__ __pyx_t_1 = 0; goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":779 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":779 * return PyArray_MultiIterNew(2, a, b) * * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< @@ -18734,7 +18734,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__ return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":782 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":782 * return PyArray_MultiIterNew(3, a, b, c) * * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< @@ -18751,7 +18751,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 1); - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":783 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":783 * * cdef inline object PyArray_MultiIterNew4(a, b, c, d): * return PyArray_MultiIterNew(4, a, b, c, d) # <<<<<<<<<<<<<< @@ -18765,7 +18765,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__ __pyx_t_1 = 0; goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":782 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":782 * return PyArray_MultiIterNew(3, a, b, c) * * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< @@ -18784,7 +18784,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__ return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":785 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":785 * return PyArray_MultiIterNew(4, a, b, c, d) * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< @@ -18801,7 +18801,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 1); - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":786 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":786 * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<< @@ -18815,7 +18815,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__ __pyx_t_1 = 0; goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":785 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":785 * return PyArray_MultiIterNew(4, a, b, c, d) * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< @@ -18834,7 +18834,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__ return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":788 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":788 * return PyArray_MultiIterNew(5, a, b, c, d, e) * * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< @@ -18848,7 +18848,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ int __pyx_t_1; __Pyx_RefNannySetupContext("PyDataType_SHAPE", 1); - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":789 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":789 * * cdef inline tuple PyDataType_SHAPE(dtype d): * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< @@ -18858,7 +18858,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ __pyx_t_1 = PyDataType_HASSUBARRAY(__pyx_v_d); if (__pyx_t_1) { - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":790 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":790 * cdef inline tuple PyDataType_SHAPE(dtype d): * if PyDataType_HASSUBARRAY(d): * return d.subarray.shape # <<<<<<<<<<<<<< @@ -18870,7 +18870,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape); goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":789 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":789 * * cdef inline tuple PyDataType_SHAPE(dtype d): * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< @@ -18879,7 +18879,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ */ } - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":792 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":792 * return d.subarray.shape * else: * return () # <<<<<<<<<<<<<< @@ -18893,7 +18893,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ goto __pyx_L0; } - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":788 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":788 * return PyArray_MultiIterNew(5, a, b, c, d, e) * * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< @@ -18908,7 +18908,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":968 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":968 * int _import_umath() except -1 * * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< @@ -18922,7 +18922,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a const char *__pyx_filename = NULL; int __pyx_clineno = 0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":969 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":969 * * cdef inline void set_array_base(ndarray arr, object base): * Py_INCREF(base) # important to do this before stealing the reference below! # <<<<<<<<<<<<<< @@ -18931,7 +18931,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a */ Py_INCREF(__pyx_v_base); - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":970 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":970 * cdef inline void set_array_base(ndarray arr, object base): * Py_INCREF(base) # important to do this before stealing the reference below! * PyArray_SetBaseObject(arr, base) # <<<<<<<<<<<<<< @@ -18940,7 +18940,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a */ __pyx_t_1 = PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(2, 970, __pyx_L1_error) - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":968 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":968 * int _import_umath() except -1 * * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< @@ -18955,7 +18955,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a __pyx_L0:; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":972 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":972 * PyArray_SetBaseObject(arr, base) * * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< @@ -18970,7 +18970,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py int __pyx_t_1; __Pyx_RefNannySetupContext("get_array_base", 1); - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":973 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":973 * * cdef inline object get_array_base(ndarray arr): * base = PyArray_BASE(arr) # <<<<<<<<<<<<<< @@ -18979,7 +18979,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py */ __pyx_v_base = PyArray_BASE(__pyx_v_arr); - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":974 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":974 * cdef inline object get_array_base(ndarray arr): * base = PyArray_BASE(arr) * if base is NULL: # <<<<<<<<<<<<<< @@ -18989,7 +18989,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py __pyx_t_1 = (__pyx_v_base == NULL); if (__pyx_t_1) { - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":975 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":975 * base = PyArray_BASE(arr) * if base is NULL: * return None # <<<<<<<<<<<<<< @@ -19000,7 +19000,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":974 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":974 * cdef inline object get_array_base(ndarray arr): * base = PyArray_BASE(arr) * if base is NULL: # <<<<<<<<<<<<<< @@ -19009,7 +19009,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py */ } - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":976 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":976 * if base is NULL: * return None * return base # <<<<<<<<<<<<<< @@ -19021,7 +19021,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py __pyx_r = ((PyObject *)__pyx_v_base); goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":972 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":972 * PyArray_SetBaseObject(arr, base) * * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< @@ -19036,7 +19036,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":980 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":980 * # Versions of the import_* functions which are more suitable for * # Cython code. * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< @@ -19060,7 +19060,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { int __pyx_clineno = 0; __Pyx_RefNannySetupContext("import_array", 1); - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":981 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":981 * # Cython code. * cdef inline int import_array() except -1: * try: # <<<<<<<<<<<<<< @@ -19076,7 +19076,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":982 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":982 * cdef inline int import_array() except -1: * try: * __pyx_import_array() # <<<<<<<<<<<<<< @@ -19085,7 +19085,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { */ __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 982, __pyx_L3_error) - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":981 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":981 * # Cython code. * cdef inline int import_array() except -1: * try: # <<<<<<<<<<<<<< @@ -19099,7 +19099,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { goto __pyx_L8_try_end; __pyx_L3_error:; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":983 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":983 * try: * __pyx_import_array() * except Exception: # <<<<<<<<<<<<<< @@ -19114,7 +19114,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":984 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":984 * __pyx_import_array() * except Exception: * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< @@ -19129,7 +19129,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { } goto __pyx_L5_except_error; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":981 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":981 * # Cython code. * cdef inline int import_array() except -1: * try: # <<<<<<<<<<<<<< @@ -19145,7 +19145,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { __pyx_L8_try_end:; } - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":980 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":980 * # Versions of the import_* functions which are more suitable for * # Cython code. * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< @@ -19168,7 +19168,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":986 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":986 * raise ImportError("numpy.core.multiarray failed to import") * * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< @@ -19192,7 +19192,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { int __pyx_clineno = 0; __Pyx_RefNannySetupContext("import_umath", 1); - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":987 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":987 * * cdef inline int import_umath() except -1: * try: # <<<<<<<<<<<<<< @@ -19208,7 +19208,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":988 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":988 * cdef inline int import_umath() except -1: * try: * _import_umath() # <<<<<<<<<<<<<< @@ -19217,7 +19217,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { */ __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 988, __pyx_L3_error) - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":987 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":987 * * cdef inline int import_umath() except -1: * try: # <<<<<<<<<<<<<< @@ -19231,7 +19231,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { goto __pyx_L8_try_end; __pyx_L3_error:; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":989 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":989 * try: * _import_umath() * except Exception: # <<<<<<<<<<<<<< @@ -19246,7 +19246,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":990 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":990 * _import_umath() * except Exception: * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< @@ -19261,7 +19261,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { } goto __pyx_L5_except_error; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":987 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":987 * * cdef inline int import_umath() except -1: * try: # <<<<<<<<<<<<<< @@ -19277,7 +19277,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { __pyx_L8_try_end:; } - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":986 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":986 * raise ImportError("numpy.core.multiarray failed to import") * * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< @@ -19300,7 +19300,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":992 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":992 * raise ImportError("numpy.core.umath failed to import") * * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< @@ -19324,7 +19324,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { int __pyx_clineno = 0; __Pyx_RefNannySetupContext("import_ufunc", 1); - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":993 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":993 * * cdef inline int import_ufunc() except -1: * try: # <<<<<<<<<<<<<< @@ -19340,7 +19340,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":994 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":994 * cdef inline int import_ufunc() except -1: * try: * _import_umath() # <<<<<<<<<<<<<< @@ -19349,7 +19349,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { */ __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 994, __pyx_L3_error) - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":993 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":993 * * cdef inline int import_ufunc() except -1: * try: # <<<<<<<<<<<<<< @@ -19363,7 +19363,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { goto __pyx_L8_try_end; __pyx_L3_error:; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":995 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":995 * try: * _import_umath() * except Exception: # <<<<<<<<<<<<<< @@ -19378,7 +19378,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":996 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":996 * _import_umath() * except Exception: * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< @@ -19393,7 +19393,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { } goto __pyx_L5_except_error; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":993 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":993 * * cdef inline int import_ufunc() except -1: * try: # <<<<<<<<<<<<<< @@ -19409,7 +19409,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { __pyx_L8_try_end:; } - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":992 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":992 * raise ImportError("numpy.core.umath failed to import") * * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< @@ -19432,7 +19432,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":999 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":999 * * * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<< @@ -19443,7 +19443,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_obj) { int __pyx_r; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1011 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":1011 * bool * """ * return PyObject_TypeCheck(obj, &PyTimedeltaArrType_Type) # <<<<<<<<<<<<<< @@ -19453,7 +19453,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_ __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyTimedeltaArrType_Type)); goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":999 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":999 * * * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<< @@ -19466,7 +19466,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_ return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1014 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":1014 * * * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<< @@ -19477,7 +19477,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_ static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_obj) { int __pyx_r; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1026 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":1026 * bool * """ * return PyObject_TypeCheck(obj, &PyDatetimeArrType_Type) # <<<<<<<<<<<<<< @@ -19487,7 +19487,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_o __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyDatetimeArrType_Type)); goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1014 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":1014 * * * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<< @@ -19500,7 +19500,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_o return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1029 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":1029 * * * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<< @@ -19511,7 +19511,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_o static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject *__pyx_v_obj) { npy_datetime __pyx_r; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1036 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":1036 * also needed. That can be found using `get_datetime64_unit`. * """ * return (obj).obval # <<<<<<<<<<<<<< @@ -19521,7 +19521,7 @@ static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject * __pyx_r = ((PyDatetimeScalarObject *)__pyx_v_obj)->obval; goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1029 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":1029 * * * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<< @@ -19534,7 +19534,7 @@ static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject * return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1039 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":1039 * * * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<< @@ -19545,7 +19545,7 @@ static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject * static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject *__pyx_v_obj) { npy_timedelta __pyx_r; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1043 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":1043 * returns the int64 value underlying scalar numpy timedelta64 object * """ * return (obj).obval # <<<<<<<<<<<<<< @@ -19555,7 +19555,7 @@ static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject __pyx_r = ((PyTimedeltaScalarObject *)__pyx_v_obj)->obval; goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1039 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":1039 * * * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<< @@ -19568,7 +19568,7 @@ static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject return __pyx_r; } -/* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1046 +/* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":1046 * * * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< @@ -19579,7 +19579,7 @@ static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObject *__pyx_v_obj) { NPY_DATETIMEUNIT __pyx_r; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1050 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":1050 * returns the unit part of the dtype for a numpy datetime64 object. * """ * return (obj).obmeta.base # <<<<<<<<<<<<<< @@ -19587,7 +19587,7 @@ static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObjec __pyx_r = ((NPY_DATETIMEUNIT)((PyDatetimeScalarObject *)__pyx_v_obj)->obmeta.base); goto __pyx_L0; - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1046 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":1046 * * * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< @@ -24424,7 +24424,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__8); __Pyx_GIVEREF(__pyx_tuple__8); - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":984 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":984 * __pyx_import_array() * except Exception: * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< @@ -24435,7 +24435,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__9); __Pyx_GIVEREF(__pyx_tuple__9); - /* "venv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":990 + /* "venv/lib/python3.11/site-packages/numpy/__init__.cython-30.pxd":990 * _import_umath() * except Exception: * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< diff --git a/mlsauce/utils/__init__.py b/mlsauce/utils/__init__.py index fea8a9a..4f57f90 100644 --- a/mlsauce/utils/__init__.py +++ b/mlsauce/utils/__init__.py @@ -11,5 +11,5 @@ "is_float", "is_factor", "Progbar", - "get_beta" + "get_beta", ] diff --git a/mlsauce/utils/get_beta.py b/mlsauce/utils/get_beta.py index 87b4cdc..27503ab 100644 --- a/mlsauce/utils/get_beta.py +++ b/mlsauce/utils/get_beta.py @@ -1,4 +1,5 @@ import numpy as np + def get_beta(X, y): return np.linalg.solve(X.T @ X, X.T @ y) diff --git a/mlsauce/utils/misc/misc.py b/mlsauce/utils/misc/misc.py index c753c24..d9204a3 100644 --- a/mlsauce/utils/misc/misc.py +++ b/mlsauce/utils/misc/misc.py @@ -8,54 +8,79 @@ from sklearn.mixture import GaussianMixture -def cluster(X, n_clusters=None, - method="kmeans", - type_scaling = "standard", - training=True, - scaler=None, - label_encoder=None, - clusterer=None, - seed=123): - +def cluster( + X, + n_clusters=None, + method="kmeans", + type_scaling="standard", + training=True, + scaler=None, + label_encoder=None, + clusterer=None, + seed=123, +): + assert method in ("kmeans", "gmm"), "method must be in ('kmeans', 'gmm')" - assert type_scaling in ("standard", "minmax", "robust"), "type_scaling must be in ('standard', 'minmax', 'robust')" + assert type_scaling in ( + "standard", + "minmax", + "robust", + ), "type_scaling must be in ('standard', 'minmax', 'robust')" - if training: - assert n_clusters is not None, "n_clusters must be provided at training time" + if training: + assert ( + n_clusters is not None + ), "n_clusters must be provided at training time" if type_scaling == "standard": - scaler = StandardScaler() + scaler = StandardScaler() elif type_scaling == "minmax": scaler = MinMaxScaler() elif type_scaling == "robust": scaler = RobustScaler() else: - raise ValueError("type_scaling must be in ('standard', 'minmax', 'robust')") - + raise ValueError( + "type_scaling must be in ('standard', 'minmax', 'robust')" + ) + scaled_X = scaler.fit_transform(X) - label_encoder = OneHotEncoder(handle_unknown='ignore') - - if method == "kmeans": - clusterer = KMeans(n_clusters=n_clusters, - random_state=seed, - n_init="auto").fit(scaled_X) - res = label_encoder.fit_transform(clusterer.labels_.reshape(-1, 1)).toarray() - elif method == "gmm": - clusterer = GaussianMixture(n_components=n_clusters, - random_state=seed).fit(scaled_X) - res = label_encoder.fit_transform(clusterer.predict(scaled_X).reshape(-1, 1)).toarray() + label_encoder = OneHotEncoder(handle_unknown="ignore") + + if method == "kmeans": + clusterer = KMeans( + n_clusters=n_clusters, random_state=seed, n_init="auto" + ).fit(scaled_X) + res = label_encoder.fit_transform( + clusterer.labels_.reshape(-1, 1) + ).toarray() + elif method == "gmm": + clusterer = GaussianMixture( + n_components=n_clusters, random_state=seed + ).fit(scaled_X) + res = label_encoder.fit_transform( + clusterer.predict(scaled_X).reshape(-1, 1) + ).toarray() else: - raise ValueError("method must be in ('kmeans', 'gmm')") - + raise ValueError("method must be in ('kmeans', 'gmm')") + return res, scaler, label_encoder, clusterer - - else: # @ inference time - - assert scaler is not None, "scaler must be provided at inferlabel_encodere time" - assert label_encoder is not None, "label_encoder must be provided at inferlabel_encodere time" - assert clusterer is not None, "clusterer must be provided at inferlabel_encodere time" - scaled_X = scaler.transform(X) - - return label_encoder.transform(clusterer.predict(scaled_X).reshape(-1, 1)).toarray() + + else: # @ inference time + + assert ( + scaler is not None + ), "scaler must be provided at inferlabel_encodere time" + assert ( + label_encoder is not None + ), "label_encoder must be provided at inferlabel_encodere time" + assert ( + clusterer is not None + ), "clusterer must be provided at inferlabel_encodere time" + scaled_X = scaler.transform(X) + + return label_encoder.transform( + clusterer.predict(scaled_X).reshape(-1, 1) + ).toarray() + # merge two dictionaries def merge_two_dicts(x, y): diff --git a/setup.py b/setup.py index 1c18541..099caab 100644 --- a/setup.py +++ b/setup.py @@ -38,7 +38,7 @@ MAINTAINER_EMAIL = 'thierry.moudiki@gmail.com' LICENSE = 'BSD3 Clause Clear' -__version__ = '0.13.0' +__version__ = '0.13.1' VERSION = __version__ @@ -155,19 +155,24 @@ def run(self): ext_modules2 = [ Extension(name="mlsauce.adaopt._adaoptc", sources=[adaopt_cython_file], - include_dirs=[numpy.get_include()]), + include_dirs=[numpy.get_include()], + packages=["adaopt"]), Extension(name="mlsauce.booster._boosterc", sources=[booster_cython_file], - include_dirs=[numpy.get_include()]), - Extension(name="mlsauce.booster._lassoc", - sources=[booster_cython_file], - include_dirs=[numpy.get_include()]), - Extension(name="mlsauce.booster._ridgec", - sources=[booster_cython_file], - include_dirs=[numpy.get_include()]), - Extension(name="mlsauce.booster._stumpc", + include_dirs=[numpy.get_include()], + packages=["booster"]), + Extension(name="mlsauce.lasso._lassoc", + sources=[lasso_cython_file], + include_dirs=[numpy.get_include()], + packages=["lasso"]), + Extension(name="mlsauce.ridge._ridgec", + sources=[ridge_cython_file], + include_dirs=[numpy.get_include()], + packages=["ridge"]), + Extension(name="mlsauce.stump._stumpc", sources=[booster_cython_file], - include_dirs=[numpy.get_include()]), + include_dirs=[numpy.get_include()], + packages=["stump"]), ] @@ -192,9 +197,9 @@ def setup_package(): install_requires = [item for sublist in [install_all_requires, install_jax_requires] for item in sublist] try: - cythonize_ext_modules = cythonize(ext_modules2) - except: cythonize_ext_modules = cythonize(ext_modules) + except Exception: + cythonize_ext_modules = cythonize(ext_modules2) metadata = dict(name=DISTNAME, maintainer=MAINTAINER,