Skip to content

Commit

Permalink
copy for AbstractConcatBasis (#116)
Browse files Browse the repository at this point in the history
* copy for AbstractConcatBasis

* Update test_basisconcat.jl
  • Loading branch information
dlfivefifty authored Aug 10, 2021
1 parent 6a4a8c0 commit 5fa44ca
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "ContinuumArrays"
uuid = "7ae1f121-cc2c-504b-ac30-9b923412ae5c"
version = "0.9.0"
version = "0.9.1"

[deps]
ArrayLayouts = "4c555306-a7a7-4459-81d9-ec55ddd5c99a"
Expand Down
2 changes: 2 additions & 0 deletions src/basisconcat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ with modified axes.
"""
abstract type AbstractConcatBasis{T} <: Basis{T} end

copy(S::AbstractConcatBasis) = S

@simplify function *(D::Derivative, S::AbstractConcatBasis)
axes(D,2) == axes(S,1) || throw(DimensionMismatch())
args = arguments.(Ref(ApplyLayout{typeof(*)}()), Derivative.(axes.(S.args,1)) .* S.args)
Expand Down
2 changes: 1 addition & 1 deletion test/test_basisconcat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import ContinuumArrays: PiecewiseBasis, VcatBasis, HvcatBasis, arguments, ApplyL
S2 = LinearSpline(2:3)
S = PiecewiseBasis(S1, S2)

@test S == S
@test S == S == copy(S)
@test checkpoints(S) == union(checkpoints(S1), checkpoints(S2))

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

2 comments on commit 5fa44ca

@dlfivefifty
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/42520

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.9.1 -m "<description of version>" 5fa44cad26db047345532a14bcdc3769dd05eec3
git push origin v0.9.1

Please sign in to comment.