Skip to content

V0.32 - robust architecture, consistent theming, widget tracking 🌟

Choose a tag to compare

@Ariel4545 Ariel4545 released this 12 Jan 15:31
· 2 commits to main since this release
7290b6e

πŸ”’ 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.
  • Dual Clipboard Export:
    • "Copy Array": Copies the formatted Numpy string (e.g., [1 2 3]).
    • "Copy Numbers": Restored the ability to copy raw, space-separated numbers (e.g., 1 2 3), optimized for pasting into Excel.