File tree Expand file tree Collapse file tree 3 files changed +13
-1
lines changed Expand file tree Collapse file tree 3 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 11name = " FiniteDifferences"
22uuid = " 26cc04aa-876d-5657-8c51-4c34ba976000"
3- version = " 0.12.18 "
3+ version = " 0.12.19 "
44
55[deps ]
66ChainRulesCore = " d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
Original file line number Diff line number Diff line change @@ -235,6 +235,13 @@ function to_vec(d::Dict)
235235 return d_vec, Dict_from_vec
236236end
237237
238+ # types
239+ function FiniteDifferences. to_vec (x:: DataType )
240+ function DataType_from_vec (x_vec:: Vector )
241+ return x
242+ end
243+ return Bool[], DataType_from_vec
244+ end
238245
239246# ChainRulesCore Differentials
240247function FiniteDifferences. to_vec (x:: Tangent{P} ) where {P}
Original file line number Diff line number Diff line change 195195 end
196196 end
197197
198+ @testset " DataType" begin
199+ test_to_vec (Float64; check_inferred= false ) # isa DataType
200+ test_to_vec (Vector; check_inferred= false ) # isa UnionAll
201+ end
202+
198203 @testset " ChainRulesCore Differentials" begin
199204 @testset " Tangent{Tuple}" begin
200205 @testset " basic" begin
You can’t perform that action at this time.
0 commit comments