Skip to content

Commit 5fa44ca

Browse files
authored
copy for AbstractConcatBasis (#116)
* copy for AbstractConcatBasis * Update test_basisconcat.jl
1 parent 6a4a8c0 commit 5fa44ca

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "ContinuumArrays"
22
uuid = "7ae1f121-cc2c-504b-ac30-9b923412ae5c"
3-
version = "0.9.0"
3+
version = "0.9.1"
44

55
[deps]
66
ArrayLayouts = "4c555306-a7a7-4459-81d9-ec55ddd5c99a"

src/basisconcat.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ with modified axes.
66
"""
77
abstract type AbstractConcatBasis{T} <: Basis{T} end
88

9+
copy(S::AbstractConcatBasis) = S
10+
911
@simplify function *(D::Derivative, S::AbstractConcatBasis)
1012
axes(D,2) == axes(S,1) || throw(DimensionMismatch())
1113
args = arguments.(Ref(ApplyLayout{typeof(*)}()), Derivative.(axes.(S.args,1)) .* S.args)

test/test_basisconcat.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import ContinuumArrays: PiecewiseBasis, VcatBasis, HvcatBasis, arguments, ApplyL
77
S2 = LinearSpline(2:3)
88
S = PiecewiseBasis(S1, S2)
99

10-
@test S == S
10+
@test S == S == copy(S)
1111
@test checkpoints(S) == union(checkpoints(S1), checkpoints(S2))
1212

1313
@test S[0.5,1:4] == [S1[0.5,1:2]; zeros(2)]

0 commit comments

Comments
 (0)