You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/jacobian.jl
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ Set `check` to `Val{false}()` to disable tag checking. This can lead to perturba
18
18
functionjacobian(f::F, x::AbstractArray, cfg::JacobianConfig{T}=JacobianConfig(f, x), ::Val{CHK}=Val{true}()) where {F,T,CHK}
19
19
require_one_based_indexing(x)
20
20
CHK &&checktag(T, f, x)
21
-
ifchunksize(cfg) ==length(x)
21
+
ifchunksize(cfg) ==structural_length(x)
22
22
returnvector_mode_jacobian(f, x, cfg)
23
23
else
24
24
returnchunk_mode_jacobian(f, x, cfg)
@@ -36,7 +36,7 @@ Set `check` to `Val{false}()` to disable tag checking. This can lead to perturba
36
36
functionjacobian(f!::F, y::AbstractArray, x::AbstractArray, cfg::JacobianConfig{T}=JacobianConfig(f!, y, x), ::Val{CHK}=Val{true}()) where {F,T, CHK}
37
37
require_one_based_indexing(y, x)
38
38
CHK &&checktag(T, f!, x)
39
-
ifchunksize(cfg) ==length(x)
39
+
ifchunksize(cfg) ==structural_length(x)
40
40
returnvector_mode_jacobian(f!, y, x, cfg)
41
41
else
42
42
returnchunk_mode_jacobian(f!, y, x, cfg)
@@ -57,7 +57,7 @@ Set `check` to `Val{false}()` to disable tag checking. This can lead to perturba
57
57
functionjacobian!(result::Union{AbstractArray,DiffResult}, f::F, x::AbstractArray, cfg::JacobianConfig{T}=JacobianConfig(f, x), ::Val{CHK}=Val{true}()) where {F,T, CHK}
58
58
result isa DiffResult ?require_one_based_indexing(x) :require_one_based_indexing(result, x)
59
59
CHK &&checktag(T, f, x)
60
-
ifchunksize(cfg) ==length(x)
60
+
ifchunksize(cfg) ==structural_length(x)
61
61
vector_mode_jacobian!(result, f, x, cfg)
62
62
else
63
63
chunk_mode_jacobian!(result, f, x, cfg)
@@ -78,7 +78,7 @@ Set `check` to `Val{false}()` to disable tag checking. This can lead to perturba
78
78
functionjacobian!(result::Union{AbstractArray,DiffResult}, f!::F, y::AbstractArray, x::AbstractArray, cfg::JacobianConfig{T}=JacobianConfig(f!, y, x), ::Val{CHK}=Val{true}()) where {F,T,CHK}
79
79
result isa DiffResult ?require_one_based_indexing(y, x) :require_one_based_indexing(result, y, x)
80
80
CHK &&checktag(T, f!, x)
81
-
ifchunksize(cfg) ==length(x)
81
+
ifchunksize(cfg) ==structural_length(x)
82
82
vector_mode_jacobian!(result, f!, y, x, cfg)
83
83
else
84
84
chunk_mode_jacobian!(result, f!, y, x, cfg)
@@ -169,10 +169,10 @@ const JACOBIAN_ERROR = DimensionMismatch("jacobian(f, x) expects that f(x) is an
0 commit comments