Skip to content

Commit

Permalink
bump xarray
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxHalford committed Jan 4, 2025
1 parent 1ac324b commit f913425
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 19 deletions.
24 changes: 13 additions & 11 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion prince/famd.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def __init__(

def _check_input(self, X):
if self.check_input:
sklearn.utils.check_array(X, dtype=[str, np.number])
sklearn.utils.check_array(X, dtype=[str, "numeric"])

@utils.check_is_dataframe_input
def fit(self, X, y=None):
Expand Down
4 changes: 2 additions & 2 deletions prince/mca.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def fit(self, X, y=None):
"""

if self.check_input:
sklearn.utils.check_array(X, dtype=[str, np.number])
sklearn.utils.check_array(X, dtype=[str, "numeric"])

# K is the number of actual variables, to apply the Benzécri correction
self.K_ = X.shape[1]
Expand Down Expand Up @@ -99,5 +99,5 @@ def column_cosine_similarities(self, X):
def transform(self, X):
"""Computes the row principal coordinates of a dataset."""
if self.check_input:
sklearn.utils.check_array(X, dtype=[str, np.number])
sklearn.utils.check_array(X, dtype=[str, "numeric"])
return self.row_coordinates(X)
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "prince"
version = "0.14.0"
version = "0.15.0"
description = "Factor analysis in Python: PCA, CA, MCA, MFA, FAMD, GPA"
authors = ["Max Halford <[email protected]>"]
license = "MIT"
Expand All @@ -19,7 +19,7 @@ ipykernel = "^6.13.0"
rpy2 = "^3.5.2"
ruff = "^0.8.5"
pre-commit = "^4.0.1"
xarray = "^2023.11.0"
xarray = "^2025.1.0"

[tool.ruff]
lint.select = ["E", "F", "I", "UP"] # https://beta.ruff.rs/docs/rules/
Expand Down
6 changes: 3 additions & 3 deletions tests/test_famd.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ def test_issue_169():
0 -1.000920 -0.669274
1 -0.092001 0.669274
>>> famd.transform(df[3:])
component 0 1
3 -0.869173 -8.050546e-17
>>> famd.transform(df[3:]).round(6)
component 0 1
3 -0.869173 -0.0
"""

0 comments on commit f913425

Please sign in to comment.