Skip to content

Commit 45a7d48

Browse files
authored
Fix LowRankFun tensorspace constructor (#284)
* Fix LowRankFun tensorspace constructor * Version bump to v0.7.38
1 parent a3bc2dc commit 45a7d48

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "ApproxFunBase"
22
uuid = "fbd15aa5-315a-5a7d-a8a4-24992e37be05"
3-
version = "0.7.37"
3+
version = "0.7.38"
44

55
[deps]
66
AbstractFFTs = "621f4979-c628-5d54-868e-fcf4e3e8185c"

src/Multivariate/LowRankFun.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,17 +59,17 @@ function LowRankFun(X::Array{T},dx::S,dy::M) where {S<:Space,M<:Space,T<:Number}
5959
U,Σ,V=svd(X)
6060
m=max(1,count(s->s>10eps(T),Σ))
6161

62-
A=VFun{S,T}[Fun(dx,U[:,k].*sqrt(Σ[k])) for k=1:m]
63-
B=VFun{M,T}[Fun(dy,conj(V[:,k]).*sqrt(Σ[k])) for k=1:m]
62+
A=VFun{S,T}[Fun(dx,@view(U[:,k]).*sqrt(Σ[k])) for k=1:m]
63+
B=VFun{M,T}[Fun(dy,conj.(@view V[:,k]).*sqrt(Σ[k])) for k=1:m]
6464

6565
LowRankFun(A,B)
6666
end
6767

6868
## Construction in a TensorSpace via a Vector of Funs
6969

7070
function LowRankFun(X::Vector{VFun{S,T}},d::TensorSpace{SV,DD}) where {S,T,DD<:EuclideanDomain{2},SV}
71-
@assert d[1] == space(X[1])
72-
LowRankFun(X,d[2])
71+
@assert factor(d, 1) == space(X[1])
72+
LowRankFun(X, factor(d, 2))
7373
end
7474

7575
function LowRankFun(X::Vector{VFun{S,T}},dy::Space) where {S,T}

0 commit comments

Comments
 (0)