Rainbow Tensor 1.3.0
Version 1.3.0 adds cross-operation element provenance, clickable result exploration, automatic themes and extensible language catalogs.
The rewritten README provides a complete starting point. The new LLM lesson guide includes a reusable prompt and runnable templates for beginner tensor explanations.
Install with python -m pip install --upgrade rainbow-tensor, or use python -m pip install --upgrade "rainbow-tensor[interactive]" for notebook controls.
Added
- Automatic themes follow the SVG viewer's light or dark preference, including saved SVG files and operand colours
- Automatic language selection follows the Python process environment and system locale, with explicit overrides
- English and Simplified Chinese catalogs cover visual labels, hover text, explanations, accessibility descriptions, and notebook controls
- New languages are discovered from UTF-8 JSON catalogs without adding a Python registry entry, and external catalogs can be loaded from a file or directory
- Regional language fallback, English fallback for missing messages, and validation of translation keys and placeholders
- A settings notebook and translation contribution guide
- A group colour notebook and architecture guide with reproducible index-query benchmarks
- Index result exploration with
explore(index, ...), preserving distinct repeated positions and reverse-slice order while highlighting the corresponding source element - Static
index(..., focus=...)comparisons with a one-source coordinate trace, bounded previews, and translated provenance text - An index explorer notebook covering repeated gathers, reversed slices, scalar outputs, and empty results
- Explicit
Flowrecipes trace output elements across indexing, shape changes, combining, reductions, matmul, and einsum without materialising intermediate arrays - Bounded provenance trees preserve repeated contribution paths, output ports, and each operation's arithmetic grouping
- Clickable result cells, Enter and Space activation, and coordinate controls explore individual operations or complete recorded flows
- Optional
focusexplains source coordinates for all shape-changing and combining views - A worked operation-origins notebook and a reusable LLM prompt guide for beginner visualizations
Changed
- The default theme and language are now
auto, while explicit settings remain available - Panel widths account for long captions and full-width characters
- Reduction groups and combining operands use colours generated from their logical IDs, with stable focus behaviour and paired light and dark paints
- SVG text and paint primitives, tensor drawing, and panel composition have separate modules while existing renderer imports remain available
- Equally shaped advanced-index arrays use direct candidate-set intersection, improving duplicate-gather previews without adding a native dependency
- Repeat uses a constant-size mapping for uniform counts and prefix boundaries for variable counts instead of allocating one source position per output copy
- Flow value requests plan recursive work before array reads, preserve live input values, and report skipped computation separately from structural truncation
- The interactive extra includes
anywidgetfor result-cell activation while static rendering remains independent of widget imports - The README now provides a complete entry point for installation, operation tracing, notebook interaction, supported APIs, and contributions
- Documentation builds use the package version directly and fail on import errors instead of showing an outdated fallback version