Skip to content

Commit

Permalink
Merge pull request #630 from GAA-UAM/feature/support_scipy_1_14
Browse files Browse the repository at this point in the history
Support SciPy 1.14.
  • Loading branch information
vnmabus authored Aug 17, 2024
2 parents 38ecba8 + 22e4618 commit 2f1fb20
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ dependencies = [
"rdata",
"scikit-datasets[cran]>=0.2.2",
"scikit-learn>=0.20",
"scipy>=1.6.0, <1.14",
"scipy>=1.6.0",
"typing-extensions",
]

Expand All @@ -64,6 +64,7 @@ test = [
"pytest",
"pytest-env",
"pytest-subtests",
"scipy>=1.14", # Changes in sparse array representation.
]

[project.urls]
Expand Down
9 changes: 6 additions & 3 deletions skfda/_utils/_neighbors_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,9 +313,12 @@ def kneighbors_graph(
>>> graph = neigh.kneighbors_graph(X[0])
>>> print(graph)
(0, 0) 1.0
(0, 8) 1.0
(0, 1) 1.0
<Compressed Sparse Row sparse matrix of dtype 'float64'
with 3 stored elements and shape (1, 30)>
Coords Values
(0, 0) 1.0
(0, 8) 1.0
(0, 1) 1.0
Notes:
This method wraps the corresponding sklearn routine in the
Expand Down
2 changes: 1 addition & 1 deletion skfda/representation/irregular.py
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ def integrate(
values_list = np.split(data.values, data.start_indices[1:])
points_list = np.split(data.points, data.start_indices[1:])
return np.array([
scipy.integrate.simpson(y, x, axis=0)
scipy.integrate.simpson(y, x=x, axis=0)
for y, x in zip(values_list, points_list)
])

Expand Down

0 comments on commit 2f1fb20

Please sign in to comment.