## [0.9.2] - 2026-03-05 - Gradient Fill, Matrix Inverse, Array Optimizations & Plot Fixes#148
Merged
alaa-eddine merged 4 commits intomainfrom Mar 5, 2026
Merged
## [0.9.2] - 2026-03-05 - Gradient Fill, Matrix Inverse, Array Optimizations & Plot Fixes#148alaa-eddine merged 4 commits intomainfrom
alaa-eddine merged 4 commits intomainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[0.9.2] - 2026-03-05 - Gradient Fill, Matrix Inverse, Array Optimizations & Plot Fixes
Added
fill()): Added support for Pine Script's gradient fill signature —fill(plot1, plot2, top_value, bottom_value, top_color, bottom_color). TheFillHelpernow detects the gradient form by checking whether the third argument is a number (gradient) or a string/color (simple fill), and stores per-bartop_value/bottom_value/top_color/bottom_colordata for rendering.Fixed
matrix.inv()— Full NxN Support: Rewrotematrix.inv()from a 2×2-only implementation to a general Gauss-Jordan elimination with partial pivoting, supporting any square matrix of arbitrary size. Singular matrices (pivot < 1e-14) correctly return a NaN matrix.matrix.pinv()— Real Pseudoinverse: Rewrotematrix.pinv()from a placeholder stub to a correct Moore-Penrose pseudoinverse: square matrices useinv(), tall matrices (m > n) use(AᵀA)⁻¹Aᵀ, and wide matrices (m < n) useAᵀ(AAᵀ)⁻¹.array.min()/array.max()Performance: Added an O(N) fast path for the commonnth=0case (find absolute min/max) instead of always sorting the full array O(N log N). Sorting is still used only whennth > 0.array.median()Performance: Replaced thefor...ofcopy + complex sort comparator with a direct index loop and simple numeric sort for faster execution.array.percentile_linear_interpolation()Performance: Validate and copy the array in a single pass (eliminating the separatevalidValuesallocation), then sort once.array.percentile_nearest_rank()Performance: Same single-pass validate-and-copy optimization aspercentile_linear_interpolation.isPlot()with Undefined Title: Fixed theisPlot()helper check to accept plots that have notitleproperty but do have a_plotKeyproperty (e.g., plots created viafill()or accessed by callsite ID). Previously these were not recognised as plot objects, causingfill()to misidentify its arguments (contribution by @dcaoyuan, #142).