Fix mypy errors in batch 2 part 2 (#1282)#1362
Conversation
Mechanical typing fixes in four files: numpy int casts, local annotations, and loop variable renaming. No behavior changes.
There was a problem hiding this comment.
Code Review
This pull request introduces minor bug fixes, type annotations, and variable renaming to avoid shadowing. Specifically, it resolves potential type issues by casting numpy outputs to integers and adds type annotations in bksf.py. The review feedback highlights two key optimization opportunities: replacing inefficient numpy operations with native Python list operations in binary_code_transform.py to avoid performance bottlenecks, and simplifying the calculation of ny in ffft.py by directly accessing the first element of the list instead of using np.prod.
Use native Python lists in the parity loop and factors[0] instead of np.prod for clearer typing and better performance.
|
@mhucka pushed new commit addressing gemini suggestions ( |
Mechanical typing fixes in four files: numpy int casts, local annotations, and loop variable renaming. No behavior changes.