Skip to content

Commit

Permalink
Compatibility with NumPy v2
Browse files Browse the repository at this point in the history
  • Loading branch information
gtca committed Oct 16, 2024
1 parent 1581c5c commit cc97fa0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions mofapy2/build_model/init_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def initZ(

if impute == True:
if np.any(np.isnan(Ytmp)):
imp = SimpleImputer(missing_values=np.NaN, strategy="mean")
imp = SimpleImputer(missing_values=np.nan, strategy="mean")
imp.fit(Ytmp)
Ytmp = imp.transform(Ytmp)

Expand Down Expand Up @@ -215,7 +215,7 @@ def initZ_smooth(

if impute == True:
if np.any(np.isnan(Ytmp)):
imp = SimpleImputer(missing_values=np.NaN, strategy="mean")
imp = SimpleImputer(missing_values=np.nan, strategy="mean")
imp.fit(Ytmp)
Ytmp = imp.transform(Ytmp)

Expand Down Expand Up @@ -366,7 +366,7 @@ def initZgU(

if impute == True:
if np.any(np.isnan(Ytmp)):
imp = SimpleImputer(missing_values=np.NaN, strategy="mean")
imp = SimpleImputer(missing_values=np.nan, strategy="mean")
imp.fit(Ytmp)
Ytmp = imp.transform(Ytmp)

Expand Down Expand Up @@ -516,7 +516,7 @@ def initSZ(

if impute == True:
if np.any(np.isnan(Ytmp)):
imp = SimpleImputer(missing_values=np.NaN, strategy="mean")
imp = SimpleImputer(missing_values=np.nan, strategy="mean")
imp.fit(Ytmp)
Ytmp = imp.transform(Ytmp)

Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "mofapy2"
version = "0.7.1"
version = "0.7.2"
description = "Multi-omics factor analysis"
authors = ['Ricard Argelaguet', 'Damien Arnol', 'Danila Bredikhin', 'Britta Velten']
license = "LGPL-3.0"
Expand All @@ -14,8 +14,8 @@ homepage = "https:/biofam.github.io/MOFA2/"

[tool.poetry.dependencies]
python = "^3.8"
numpy = "^1"
pandas = "> 1"
numpy = "*"
pandas = "*"
scipy = "~1"
scikit-learn = "~1"
h5py = "~3"
Expand Down

0 comments on commit cc97fa0

Please sign in to comment.