Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .jules/bolt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## 2025-05-15 - np.errstate and Indentation in runica training loops
**Learning:** Moving `np.errstate` context managers outside of high-frequency iterative loops (like the ICA training blocks) and replacing internal helper wrappers (like `_matmul`) with native operators (like `@`) can yield a measurable (~10%) performance gain by eliminating function call and context entry/exit overhead. However, when wrapping large blocks of code with a new context manager, it's critical to verify the indentation of all nested logical blocks (e.g., restart conditions) to avoid bypassing core logic or breaking functionality.
**Action:** When refactoring iterative numerical loops, prioritize moving context managers like `np.errstate` outside the loop, use native matrix operators, and perform a thorough indentation check on all nested `if/else` and `for` blocks.
Loading
Loading