Commit Graph

5 Commits

Author SHA1 Message Date
Jérémie du Boisberranger 9cb1111028
MAINT Cython linting (#25861) 2023-04-19 14:32:53 +00:00
Omar Salman 0a36bd8892
MAINT Remove -Wcpp warnings when compiling sklearn.svm._liblinear (#25112)
* MAINT Remove -Wcpp warnings when compiling sklearn.svm._liblinear

* Convert the required data in X to bytes

* Add NULL check for class_weight_label

* Add NULL check for class_weight

* Add sklearn.svm._liblinear in setup.py

* Use intermediate memoryviews for static reinterpretation of dtypes

* * Remove the usage of tobytes()
* Use separate memory views for float64 and float32 to handle the possibly dtypes of X
* Separate the functionality to get the bytes of X in functions for sparse and normal ndarray

* Remove the use of functions and implement the functionality directly in train_wrap

* Minor refactor

* Refactor variables names involving X to use capital X

* Define y, class_weight and sample_weight as const memory views

* Use const with X_indices and X_indptr memory view declarations

Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
2023-01-09 08:31:15 +01:00
Rocco Meli 6f95739e0c
MNT Use cimport numpy as cnp for sklearn/svm (#23326) 2022-05-14 09:06:18 -04:00
Jérémie du Boisberranger 9e5819aa41 MNT Include all pxd files in the package (#15626)
* include all pxd files in package

* _libsvm _liblinear to pxi + add a test

* simplify stuff + use pathlib

* cln

* more cln
2019-11-26 17:37:26 +01:00
Nicolas Hug 5c5635feb7 MNT make files private in sklearn.svm (#15165) 2019-10-18 16:18:33 -04:00