You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHubβs verified signature.
π’ NumpyGui Update Patch Notes
π Version Comparison
Feature
ποΈ Previous Version
π Updated Version
Architecture
Long if-elif chains
Dictionary Dispatching (Clean & Fast)
Theme Engine
Static / Buggy
Dynamic Tracking (Glitch-free switching)
Input Engine
1D Lists (Flattened)
2D Matrices (Multi-line Detection)
UI Theme
Mixed (Native + Custom)
Fully Consistent (CTkToplevel)
Feedback
Console Prints
In-App Status Bar (Color-coded)
Stability
Prone to crashes
Global Error Handling
β¨ Detailed Changes
π οΈ 1. Core Architecture & Optimization
Dictionary Dispatching: Replaced repetitive if-elif blocks with dictionary mappings for Arithmetic, Trigonometry, Statistics, and UI generation. This significantly reduces code complexity and improves performance.
Dynamic Widget Tracking: Implemented a robust system to track UI elements. Widgets are registered in optimized batches, ensuring that theme changes (Light/Dark) apply instantly and correctly to every button and label, fixing previous visual glitches.
Smart Input Parsing: The turn_into_array engine was rewritten. It now detects newlines to construct 2D Numpy Arrays, enabling true matrix operations instead of flattening everything into a list.
Safety Pipeline: All mathematical operations are now wrapped in try-except blocks. Invalid inputs trigger a UI warning instead of crashing the application.
π¨ 2. User Interface (UI/UX)
Enhanced Night Mode: Fixed issues where tab labels and button edges would remain in the wrong color state. The new theme engine recursively updates all nested widgets.
Consistent Theming: All popup windowsβResults, Size Filter, Parity Filter, Searchβnow use CTkToplevel. They automatically inherit the user's Dark/Light theme preference.
Visual Clarity: Added "Array A" and "Array B" labels to the input fields, eliminating confusion during binary operations.
Status Bar: A new status label at the bottom of the screen provides immediate feedback (e.g., "Calculated Sin" or "Invalid Input").
π 3. Functional Enhancements
Matrix Support: Full support for 2D array inputs. Operations like Get shape now return (rows, columns) correctly.
Fixed "Mode" Statistic: The previous version incorrectly used numpy.mod (remainder) for the "Mode" button, causing crashes. The update now safely implements scipy.stats.mode with a fallback check.