Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explicit arguments for simpson #624

Merged
merged 1 commit into from
Aug 1, 2024
Merged

Explicit arguments for simpson #624

merged 1 commit into from
Aug 1, 2024

Conversation

BerriesLab
Copy link
Contributor

References to issues or other PRs

Describe the proposed changes

self._weights = scipy.integrate.simpson(y=identity, x=X.grid_points[0])

should replace

self._weights = scipy.integrate.simpson(identity, X.grid_points[0])

in FPCA._fit_grid (currently line 351 in "Functional Principal Component Analysis Module.")

By not specifying x and y, simpson() returns the error:

TypeError: simpson() takes 1 positional argument but 2 were given

Additional information

Checklist before requesting a review

  • I have performed a self-review of my code
  • The code conforms to the style used in this package
  • The code is fully documented and typed (type-checked with Mypy)
  • I have added thorough tests for the new/changed functionality

Copy link
Member

@vnmabus vnmabus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix!

The tests pass and the change is non-controversial, so I will merge it.

@vnmabus vnmabus merged commit 64235be into GAA-UAM:develop Aug 1, 2024
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants