Skip to content

Commit ddee5df

Browse files
Merge pull request #1226 from ashutosh-b-b/fix_integral_get_unit
Fix integral in get_unit for one dimensional case
2 parents 0e503bf + 6eb5443 commit ddee5df

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/systems/validation.jl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,12 @@ function get_unit(x::Symbolic)
3535
return get_unit(arguments(x)[1]) / get_unit(operation(x).x)
3636
elseif operation(x) isa Integral
3737
unit = 1
38-
for u in operation(x).x
39-
unit *= get_unit(u)
38+
if operation(x).x isa Vector
39+
for u in operation(x).x
40+
unit *= get_unit(u)
41+
end
42+
else
43+
unit *= get_unit(operation(x).x)
4044
end
4145
return get_unit(arguments(x)[1]) * unit
4246
elseif operation(x) isa Difference

0 commit comments

Comments
 (0)