Skip to content

Commit 3333cd9

Browse files
committed
Add missing assert statement
1 parent 8cf418f commit 3333cd9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/symbolic_dimensions.jl

+1
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ function uconvert(qout::AbstractQuantity{<:Any, <:SymbolicDimensions}, q::Abstra
123123
return new_quantity(typeof(q), new_val, new_dim)
124124
end
125125
function uconvert(qout::AbstractQuantity{<:Any,<:SymbolicDimensions}, q::QuantityArray{<:Any,<:Any,<:Dimensions})
126+
@assert isone(ustrip(qout)) "You passed a quantity with a non-unit value to uconvert."
126127
qout_expanded = expand_units(qout)
127128
dimension(q) == dimension(qout_expanded) || throw(DimensionError(q, qout_expanded))
128129
new_array = ustrip(q) ./ ustrip(qout_expanded)

0 commit comments

Comments
 (0)