Skip to content

Commit

Permalink
Don't use lazy strings. (#91)
Browse files Browse the repository at this point in the history
Means we don't have to drop support for older Julia.

Co-authored-by: Ashley Milsted <[email protected]>
  • Loading branch information
amilsted and Ashley Milsted authored Apr 18, 2023
1 parent 6d64805 commit 53d5611
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/operators.jl
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ multiplicable(a::AbstractOperator, b::AbstractOperator) = multiplicable(a.basis_

Base.size(op::AbstractOperator) = (length(op.basis_l),length(op.basis_r))
function Base.size(op::AbstractOperator, i::Int)
i < 1 && throw(ErrorException(lazy"dimension out of range, should be strictly positive, got $i"))
i < 1 && throw(ErrorException("dimension index is < 1"))
i > 2 && return 1
i==1 ? length(op.basis_l) : length(op.basis_r)
end
6 changes: 3 additions & 3 deletions src/operators_lazytensor.jl
Original file line number Diff line number Diff line change
Expand Up @@ -654,15 +654,15 @@ end
function _check_mul!_dim_compatibility(sizeR::Tuple, sizeA::Tuple, sizeB::Tuple)
# R .= A*B
if sizeA[2] != sizeB[1]
throw(DimensionMismatch(lazy"A has dimensions $sizeA but B has dimensions $sizeB. Can't do `A*B`"))
throw(DimensionMismatch("A and B dimensions do not match. Can't do `A*B`"))
end
if sizeR != (sizeA[1], Base.tail(sizeB)...) # using tail to account for vectors
throw(DimensionMismatch(lazy"R has dimensions $sizeR but A*B has dimensions $((sizeA[1], Base.tail(sizeB)...)). Can't do `R.=A*B`"))
throw(DimensionMismatch("Output dimensions do not match A*B. Can't do `R.=A*B`"))
end
end
function _check_mul!_aliasing_compatibility(R, A, B)
if R===A || R===B
throw(ArgumentError(lazy"output matrix must not be aliased with input matrix"))
throw(ArgumentError("output matrix must not be aliased with input matrix"))
end
end

Expand Down

0 comments on commit 53d5611

Please sign in to comment.