Skip to content

Fix docstring and type hints for l_freq and h_freq in ICA.score_sources (#13689)#13784

Closed
DivyanshiJadon wants to merge 1 commit intomne-tools:mainfrom
DivyanshiJadon:fix-score-sources-types
Closed

Fix docstring and type hints for l_freq and h_freq in ICA.score_sources (#13689)#13784
DivyanshiJadon wants to merge 1 commit intomne-tools:mainfrom
DivyanshiJadon:fix-score-sources-types

Conversation

@DivyanshiJadon
Copy link
Copy Markdown

(Fixes #13689)

What does this implement/fix?

This PR makes two small, targeted changes in score_sources:

  1. Function signature:
l_freq: float | None = None
h_freq: float | None = None
2.**Docstring:**
l_freq : float | None
    Low cut-off frequency. If None, no filtering is applied.
h_freq : float | None
    High cut-off frequency. If None, no filtering is applied.


#### Additional information

<!-- Any additional information you think is important. -->

@DivyanshiJadon DivyanshiJadon force-pushed the fix-score-sources-types branch from bb83482 to e064330 Compare March 25, 2026 15:45
@Aniketsy
Copy link
Copy Markdown
Contributor

@DivyanshiJadon thanks for the PR, but there is already PR for this issue and i think @1himan is working on that, so i'll suggest to ask before making duplicate efforts, it will save your time, also please feel free to look other issues which interests you.
thanks again :)

@1himan
Copy link
Copy Markdown
Contributor

1himan commented Mar 27, 2026

yeah there's already a PR currently in progress on that issue. I was planning to add type hints in the whole ica.py while rather than just some handpicked functions. But that leads to another issue which is being discussed here.

@DivyanshiJadon
Copy link
Copy Markdown
Author

DivyanshiJadon commented Mar 27, 2026 via email

@1himan
Copy link
Copy Markdown
Contributor

1himan commented Mar 27, 2026

so we closing this @DivyanshiJadon ... or what? Because maintainers are already having a hard time reviewing PRs(the numbers have surged in the past ~3months), so we don't want to add on top of that. But anyways if you're willing to make an effort on this please read the discussion I gave link to in the comment above.

my hunch is this: The main problem was adding ArrayLike type hint leads to doc build errors. So we might as well wanto let sphinx know that its a recognized term apart from just array-like.

@DivyanshiJadon
Copy link
Copy Markdown
Author

DivyanshiJadon commented Mar 27, 2026 via email

@drammock
Copy link
Copy Markdown
Member

Adding type hints to just a couple of function args is not something we will merge. Our goal is to hint entire files / submodules at a time. Additionally, the pattern description changes (e.g. from "low pass" to "low cutoff") are incorrect --- the low cutoff is associated with the high pass filter

@drammock drammock closed this Mar 28, 2026
@DivyanshiJadon
Copy link
Copy Markdown
Author

DivyanshiJadon commented Mar 28, 2026 via email

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.

Type or doc improvement?

4 participants