Skip to content

orthogonalize view methods #137

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jishnub
Copy link
Member

@jishnub jishnub commented Aug 4, 2022

On master

julia> M = Multiplication(Fun(PointSpace(1:3), [1:3;]), PointSpace(1:3))
FiniteOperator : PointSpace([1, 2, 3])  PointSpace([1, 2, 3])
 1  0  0
 0  2  0
 0  0  3

julia> S = view(M, :, :)
SubOperator : PointSpace([1, 2, 3])|1:3  PointSpace([1, 2, 3])|1:3
 1    
   2  
     3

julia> view(S, :, 1:3)
ERROR: MethodError: view(::ApproxFunBase.SubOperator{Int64, FiniteOperator{Diagonal{Int64, Vector{Int64}}, Int64, PointSpace{Int64, DomainSets.UnionDomain{Vector{DomainSets.Point{Int64}}, DomainSets.Point{Int64}}, Int64}, PointSpace{Int64, DomainSets.UnionDomain{Vector{DomainSets.Point{Int64}}, DomainSets.Point{Int64}}, Int64}}, Tuple{UnitRange{Int64}, UnitRange{Int64}}, Tuple{Int64, Int64}, Tuple{Int64, Int64}}, ::Colon, ::UnitRange{Int64}) is ambiguous. Candidates:
  view(A::Operator, ::Colon, jr) in ApproxFunBase at /home/jishnu/Dropbox/JuliaPackages/ApproxFunBase/src/Operators/SubOperator.jl:112
  view(V::ApproxFunBase.SubOperator, kr, jr) in ApproxFunBase at /home/jishnu/Dropbox/JuliaPackages/ApproxFunBase/src/Operators/SubOperator.jl:168
Possible fix, define
  view(::ApproxFunBase.SubOperator, ::Colon, ::Any)
Stacktrace:
 [1] top-level scope
   @ REPL[57]:1

After this PR

julia> view(S, :, 1:3)
SubOperator : PointSpace([1, 2, 3])|1:3  PointSpace([1, 2, 3])|1:3
 1    
   2  
     3

@codecov
Copy link

codecov bot commented Aug 4, 2022

Codecov Report

Merging #137 (bcf1a16) into master (327cdb8) will decrease coverage by 5.38%.
The diff coverage is 100.00%.

❗ Current head bcf1a16 differs from pull request most recent head 3b47e78. Consider uploading reports for the commit 3b47e78 to get more accurate results

@@            Coverage Diff             @@
##           master     #137      +/-   ##
==========================================
- Coverage   20.42%   15.04%   -5.39%     
==========================================
  Files          76       76              
  Lines        7818     7743      -75     
==========================================
- Hits         1597     1165     -432     
- Misses       6221     6578     +357     
Impacted Files Coverage Δ
src/Operators/SubOperator.jl 32.78% <100.00%> (+4.52%) ⬆️
src/LinearAlgebra/hesseneigs.jl 0.00% <0.00%> (-94.29%) ⬇️
src/LinearAlgebra/blas.jl 0.00% <0.00%> (-77.78%) ⬇️
src/Operators/banded/Conversion.jl 0.00% <0.00%> (-64.29%) ⬇️
src/Space.jl 22.38% <0.00%> (-43.68%) ⬇️
src/LinearAlgebra/standardchop.jl 0.00% <0.00%> (-22.73%) ⬇️
src/ApproxFunBase.jl 50.00% <0.00%> (-16.67%) ⬇️
src/Operators/general/algebra.jl 42.90% <0.00%> (-16.32%) ⬇️
src/Caching/banded.jl 49.07% <0.00%> (-14.82%) ⬇️
src/constructors.jl 32.63% <0.00%> (-14.18%) ⬇️
... and 20 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

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

Successfully merging this pull request may close these issues.

1 participant