Skip to content

Commit

Permalink
Merge pull request #82 from SciML/similar_type
Browse files Browse the repository at this point in the history
similar_type for SLArray
  • Loading branch information
ChrisRackauckas authored Jul 6, 2020
2 parents 6772f6b + 78eb7e4 commit 0998b0b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "LabelledArrays"
uuid = "2ee39098-c373-598a-b85f-a56591580800"
authors = ["Chris Rackauckas <[email protected]>"]
version = "1.2.2"
version = "1.3.0"

[deps]
ArrayInterface = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9"
Expand Down
2 changes: 2 additions & 0 deletions src/slarray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ function Base.convert(::Type{NamedTuple}, x::SLArray{S,T,N,L,Syms}) where {S,T,N
end
Base.keys(x::SLArray{S,T,N,L,Syms}) where {S,T,N,L,Syms} = Syms

StaticArrays.similar_type(::Type{SLArray{S,T,N,L,Syms}},T2,::Size{S}) where {S,T,N,L,Syms} = SLArray{S,T2,N,L,Syms}

## Named tuple to SLArray
#=
1. `SLArray{Tuple{2,2}}((a=1, b=2, c=3, d=4))` (need to specify size)
Expand Down

0 comments on commit 0998b0b

Please sign in to comment.