Skip to content

Commit 4b4d0a6

Browse files
authored
Merge pull request tpapp#116 from tpapp/tp/fix-as-SVector1
Fix as(SVector{1}) transformations.
2 parents 72a39cf + b9a7fee commit 4b4d0a6

File tree

6 files changed

+5
-4
lines changed

6 files changed

+5
-4
lines changed

.github/workflows/CI.yml

-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ jobs:
1919
version:
2020
- '1.6' # Replace this with the minimum Julia version that your package supports. E.g. if your package requires Julia 1.5 or higher, change this to '1.5'.
2121
- '1' # Leave this line unchanged. '1' will automatically expand to the latest stable 1.x release of Julia.
22-
- 'nightly'
2322
os:
2423
- ubuntu-latest
2524
arch:

Project.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "TransformVariables"
22
uuid = "84d833dd-6860-57f9-a1a7-6da5db126cff"
33
authors = ["Tamas K. Papp <tkpapp@gmail.com>"]
4-
version = "0.8.7"
4+
version = "0.8.8"
55

66
[deps]
77
ArgCheck = "dce04be8-c92d-5529-be00-80e4d2c0e197"

docs/Project.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
33

44
[compat]
5-
Documenter = "~0.27"
5+
Documenter = "1"

src/aggregation.jl

+1
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ function transform_with(flag::LogJacFlag, transformation::StaticArrayTransformat
197197
# NOTE this is a fix for #112, enforcing types taken from the transformation of the
198198
# first element.
199199
y1, ℓ1, index1 = transform_with(flag, inner_transformation, x, index)
200+
D == 1 && return SArray{S}(y1), ℓ1, index1
200201
L = typeof(ℓ1)
201202
let::L = ℓ1, index::Int = index1
202203
function _f(_)

src/generic.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ generating graphs and data summaries.
362362
363363
Transformations may provide a heuristic label.
364364
365-
Transformations should implement [`_domain_label`](@ref).
365+
Transformations should implement `_domain_label`.
366366
367367
# Example
368368

test/runtests.jl

+1
Original file line numberDiff line numberDiff line change
@@ -643,6 +643,7 @@ end
643643

644644
@testset "static arrays inference" begin
645645
@test @inferred transform_with(NOLOGJAC, as(SVector{3, Float64}), zeros(3), 1) == (SVector(0.0, 0.0, 0.0), NOLOGJAC, 4)
646+
@test @inferred transform_with(NOLOGJAC, as(SVector{1, Float64}), zeros(1), 1) == (SVector(0.0), NOLOGJAC, 2)
646647
end
647648

648649
@testset "view transformations" begin

0 commit comments

Comments
 (0)