191191 elseif A. uplo == ' L' && (i == j + 1 )
192192 @inbounds A. ev[j] = x
193193 elseif ! iszero (x)
194- throw (ArgumentError (string ( " cannot set entry ($i , $j ) off the " ,
195- " $( istriu (A) ? " upper" : " lower" ) bidiagonal band to a nonzero value ( $x ) " )))
194+ throw (ArgumentError (LazyString ( lazy " cannot set entry ($i, $j) off the " ,
195+ istriu (A) ? " upper" : " lower" , " bidiagonal band to a nonzero value " , x )))
196196 end
197197 return x
198198end
@@ -320,7 +320,7 @@ function _copyto_banded!(A::Bidiagonal, B::Bidiagonal)
320320 else
321321 zeroband = istriu (A) ? " lower" : " upper"
322322 uplo = A. uplo
323- throw (ArgumentError (string (" cannot set the " ,
323+ throw (ArgumentError (LazyString (" cannot set the " ,
324324 zeroband, " bidiagonal band to a nonzero value for uplo=:" , uplo)))
325325 end
326326 return A
@@ -373,8 +373,8 @@ ishermitian(M::Bidiagonal) = isdiag(M) && all(ishermitian, M.dv)
373373function tril! (M:: Bidiagonal{T} , k:: Integer = 0 ) where T
374374 n = length (M. dv)
375375 if ! (- n - 1 <= k <= n - 1 )
376- throw (ArgumentError (string ( " the requested diagonal, $k , must be at least " ,
377- " $(- n - 1 ) and at most $(n - 1 ) in an $n -by-$n matrix" )))
376+ throw (ArgumentError (LazyString ( lazy " the requested diagonal, $k, must be at least " ,
377+ lazy " $(-n - 1) and at most $(n - 1) in an $n-by-$n matrix" )))
378378 elseif M. uplo == ' U' && k < 0
379379 fill! (M. dv, zero (T))
380380 fill! (M. ev, zero (T))
392392function triu! (M:: Bidiagonal{T} , k:: Integer = 0 ) where T
393393 n = length (M. dv)
394394 if ! (- n + 1 <= k <= n + 1 )
395- throw (ArgumentError (string ( " the requested diagonal, $k , must be at least" ,
396- " $(- n + 1 ) and at most $(n + 1 ) in an $n -by-$n matrix" )))
395+ throw (ArgumentError (LazyString ( lazy " the requested diagonal, $k, must be at least" ,
396+ lazy " $(-n + 1) and at most $(n + 1) in an $n-by-$n matrix" )))
397397 elseif M. uplo == ' L' && k > 0
398398 fill! (M. dv, zero (T))
399399 fill! (M. ev, zero (T))
@@ -418,8 +418,8 @@ function diag(M::Bidiagonal{T}, n::Integer=0) where T
418418 elseif - size (M,1 ) <= n <= size (M,1 )
419419 return fill! (similar (M. dv, size (M,1 )- abs (n)), zero (T))
420420 else
421- throw (ArgumentError (string ( " requested diagonal, $n , must be at least $(- size (M, 1 )) " ,
422- " and at most $(size (M, 2 )) for an $(size (M, 1 )) -by-$(size (M, 2 )) matrix" )))
421+ throw (ArgumentError (LazyString ( lazy " requested diagonal, $n, must be at least $(-size(M, 1)) " ,
422+ lazy " and at most $(size(M, 2)) for an $(size(M, 1))-by-$(size(M, 2)) matrix" )))
423423 end
424424end
425425
0 commit comments