Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support (T/T) \ f for expansions #80

Closed
dlfivefifty opened this issue Mar 2, 2021 · 1 comment
Closed

Support (T/T) \ f for expansions #80

dlfivefifty opened this issue Mar 2, 2021 · 1 comment

Comments

@dlfivefifty
Copy link
Member

At the moment we do expansions as

T * (T \ f)

but it might be convenient to allow an expansion operator. This would obviously be T/T, which is short-hand for T*inv(T). So the above could be changed to

(T/T)\f

I'm surprised it doesn't work already but probably just need to make sure things are flagged as lazy:

julia> Z / Z
ERROR: MethodError: no method matching similar(::Type{Array{Float64, N} where N}, ::Tuple{QuasiArrays.Inclusion{SVector{2, Float64}, DomainSets.FixedUnitBall{SVector{2, Float64}, :closed}}, QuasiArrays.Inclusion{SVector{2, Float64}, DomainSets.FixedUnitBall{SVector{2, Float64}, :closed}}})
Closest candidates are:
  similar(::QuasiArrays.AbstractQuasiArray{T, N} where N, ::Tuple) where T at /Users/sheehanolver/.julia/packages/QuasiArrays/Eszna/src/abstractquasiarray.jl:295
  similar(::AbstractBlockArray{T, N} where N, ::Tuple) where T at /Users/sheehanolver/.julia/packages/BlockArrays/g01fJ/src/abstractblockarray.jl:38
  similar(::AbstractArray{T, N} where N, ::Tuple) where T at abstractarray.jl:734
  ...
Stacktrace:
 [1] similar(A::ArrayLayouts.Rdiv{ContinuumArrays.BasisLayout, ContinuumArrays.BasisLayout, Zernike{Float64}, Zernike{Float64}}, #unused#::Type{Float64}, axes::Tuple{QuasiArrays.Inclusion{SVector{2, Float64}, DomainSets.FixedUnitBall{SVector{2, Float64}, :closed}}, QuasiArrays.Inclusion{SVector{2, Float64}, DomainSets.FixedUnitBall{SVector{2, Float64}, :closed}}})
   @ ArrayLayouts ~/.julia/packages/ArrayLayouts/75WvP/src/ldiv.jl:17
 [2] similar(A::ArrayLayouts.Rdiv{ContinuumArrays.BasisLayout, ContinuumArrays.BasisLayout, Zernike{Float64}, Zernike{Float64}}, #unused#::Type{Float64})
   @ ArrayLayouts ~/.julia/packages/ArrayLayouts/75WvP/src/ldiv.jl:18
 [3] similar(A::ArrayLayouts.Rdiv{ContinuumArrays.BasisLayout, ContinuumArrays.BasisLayout, Zernike{Float64}, Zernike{Float64}})
   @ ArrayLayouts ~/.julia/packages/ArrayLayouts/75WvP/src/ldiv.jl:19
 [4] copy
   @ ~/.julia/packages/ArrayLayouts/75WvP/src/ldiv.jl:21 [inlined]
 [5] materialize
   @ ~/.julia/packages/ArrayLayouts/75WvP/src/ldiv.jl:22 [inlined]
 [6] rdiv
   @ ~/.julia/packages/ArrayLayouts/75WvP/src/ldiv.jl:87 [inlined]
 [7] /(A::Zernike{Float64}, B::Zernike{Float64})
   @ QuasiArrays ~/.julia/packages/QuasiArrays/Eszna/src/matmul.jl:38
 [8] top-level scope
   @ REPL[32]:1
@dlfivefifty
Copy link
Member Author

Done. In fact T/T\f works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant