Skip to content

fix: resolve pyright type checking errors in lc2st.py#1776

Closed
mhusnain-tech wants to merge 1 commit intosbi-dev:mainfrom
mhusnain-tech:patch-5
Closed

fix: resolve pyright type checking errors in lc2st.py#1776
mhusnain-tech wants to merge 1 commit intosbi-dev:mainfrom
mhusnain-tech:patch-5

Conversation

@mhusnain-tech
Copy link

This commit fixes the "float is not iterable" error in the eval_lc2st function. The list multiplication [0.5] * len(proba) was replaced with a direct subtraction (proba - 0.5) to utilize NumPy's broadcasting. This resolves the type ambiguity for Pyright and improves code efficiency.

This commit fixes the "float is not iterable" error in the eval_lc2st function. The list multiplication [0.5] * len(proba) was replaced with a direct subtraction (proba - 0.5) to utilize NumPy's broadcasting. This resolves the type ambiguity for Pyright and improves code efficiency.
@janfb
Copy link
Contributor

janfb commented Feb 20, 2026

Hi @mhusnain-tech ,

Please adhere to our contribution guidelines and discuss PR via issues before opening them.

This problem has been fixed already in the recent PR #1774

@janfb janfb closed this Feb 20, 2026
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