From 976b8f604952b8f468fb87e6deb07029769b144a Mon Sep 17 00:00:00 2001 From: Sheehan Olver Date: Mon, 21 Jul 2025 13:00:58 +0100 Subject: [PATCH] Only overload weighted canonical indexing, and fix case of matrix weight --- Project.toml | 2 +- src/normalized.jl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Project.toml b/Project.toml index 7e088f60..3fa63d9d 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "ClassicalOrthogonalPolynomials" uuid = "b30e2e7b-c4ee-47da-9d5f-2c5c27239acd" authors = ["Sheehan Olver "] -version = "0.15.2" +version = "0.15.3" [deps] diff --git a/src/normalized.jl b/src/normalized.jl index 36f2fc83..fe01dc5d 100644 --- a/src/normalized.jl +++ b/src/normalized.jl @@ -165,7 +165,7 @@ abstract type AbstractWeighted{T} <: Basis{T} end -getindex(Q::AbstractWeighted, x::Union{Number,AbstractVector}, jr::Union{Number,AbstractVector}) = weight(Q)[x] .* unweighted(Q)[x,jr] +_getindex(::Type{IND}, Q::AbstractWeighted, (x,j)::IND) where IND = weight(Q)[x] * unweighted(Q)[x,j] MemoryLayout(::Type{<:AbstractWeighted}) = WeightedBasisLayout{OPLayout}() convert(::Type{WeightedBasis}, Q::AbstractWeighted) = weight(Q) .* unweighted(Q)