-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #40 from msamsami/add-support-new-numpy-sklearn
maint: add support for python 3.13, numpy 2, and scikit-learn 1.6
- Loading branch information
Showing
13 changed files
with
77 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
pandas>=1.4.1 | ||
numpy<2.0.0 | ||
scipy>=1.8.0 | ||
scikit-learn>=1.0.2 | ||
typing-extensions>=4.8.0; python_version < "3.11" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
pytest>=7.0.0 | ||
black==24.8.0 | ||
black>=24.8.0 | ||
tqdm | ||
pre-commit | ||
pre-commit>=3.5.0 | ||
isort |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ | |
name="wnb", | ||
version=__version__, | ||
description="Python library for the implementations of general and weighted naive Bayes (WNB) classifiers.", | ||
keywords=["python", "machine learning", "bayes", "naive bayes", "classifier", "probabilistic"], | ||
keywords=["python", "machine learning", "bayes", "naive bayes", "classifier"], | ||
author="Mehdi Samsami", | ||
author_email="[email protected]", | ||
license="BSD License", | ||
|
@@ -32,22 +32,22 @@ | |
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
"Programming Language :: Python :: 3.13", | ||
"License :: OSI Approved :: BSD License", | ||
], | ||
python_requires=">=3.8,<3.13", | ||
python_requires=">=3.8,<3.14", | ||
install_requires=[ | ||
"pandas>=1.4.1", | ||
"numpy<2.0.0", | ||
"scipy>=1.8.0", | ||
"scikit-learn>=1.0.2", | ||
"typing-extensions>=4.8.0; python_full_version < '3.11'", | ||
], | ||
extras_require={ | ||
"dev": [ | ||
"pytest>=7.0.0", | ||
"black==24.8.0", | ||
"black>=24.8.0", | ||
"tqdm", | ||
"pre-commit", | ||
"pre-commit>=3.5.0", | ||
"isort", | ||
] | ||
}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
from typing import Any | ||
|
||
import sklearn | ||
from packaging import version | ||
from sklearn.utils import check_array | ||
|
||
__all__ = ["SKLEARN_V1_6_OR_LATER", "validate_data"] | ||
|
||
|
||
SKLEARN_V1_6_OR_LATER = version.parse(sklearn.__version__) >= version.parse("1.6") | ||
|
||
|
||
if SKLEARN_V1_6_OR_LATER: | ||
from sklearn.utils.validation import validate_data | ||
else: | ||
|
||
def validate_data(estimator, X, **kwargs: Any): | ||
kwargs.pop("reset", None) | ||
return check_array(X, estimator=estimator, **kwargs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters