diff --git a/base/docs/helpdb/Base.jl b/base/docs/helpdb/Base.jl index 1e50a3993b4c7..15ba42a4c60b2 100644 --- a/base/docs/helpdb/Base.jl +++ b/base/docs/helpdb/Base.jl @@ -5672,9 +5672,9 @@ Base.(:(.!=)) lufact!(A) -> LU `lufact!` is the same as [`lufact`](:func:`lufact`), but saves space by overwriting the -input `A`, instead of creating a copy. For sparse `A` the `nzval` field is not overwritten -but the index fields, `colptr` and `rowval` are decremented in place, converting from -1-based indices to 0-based indices. +input `A`, instead of creating a copy. An `InexactError` exception is thrown if the +factorisation produces a number not representable by the element type of `A`, e.g. for +integer types. """ lufact! @@ -6552,8 +6552,9 @@ Scale an array `A` by a scalar `b` overwriting `A` in-place. If `A` is a matrix and `b` is a vector, then `scale!(A,b)` scales each column `i` of `A` by `b[i]` (similar to `A*Diagonal(b)`), while `scale!(b,A)` scales each row `i` of `A` by `b[i]` -(similar to `Diagonal(b)*A`), again operating in-place on `A`. - +(similar to `Diagonal(b)*A`), again operating in-place on `A`. An `InexactError` exception is +thrown if the scaling produces a number not representable by the element type of `A`, +e.g. for integer types. """ scale! @@ -8573,6 +8574,8 @@ Ac_mul_B `qrfact!` is the same as [`qrfact`](:func:`qrfact`) when `A` is a subtype of `StridedMatrix`, but saves space by overwriting the input `A`, instead of creating a copy. +An `InexactError` exception is thrown if the factorisation produces a number not +representable by the element type of `A`, e.g. for integer types. """ qrfact! diff --git a/base/linalg/cholesky.jl b/base/linalg/cholesky.jl index 390ee3c019331..847b91e4a7f7f 100644 --- a/base/linalg/cholesky.jl +++ b/base/linalg/cholesky.jl @@ -126,7 +126,10 @@ end """ cholfact!(A::StridedMatrix, uplo::Symbol, Val{false}) -> Cholesky -The same as `cholfact`, but saves space by overwriting the input `A`, instead of creating a copy. +The same as `cholfact`, but saves space by overwriting the input `A`, instead +of creating a copy. An `InexactError` exception is thrown if the factorisation +produces a number not representable by the element type of `A`, e.g. for +integer types. """ function cholfact!(A::StridedMatrix, uplo::Symbol, ::Type{Val{false}}) if uplo == :U @@ -139,7 +142,10 @@ end """ cholfact!(A::StridedMatrix, uplo::Symbol, Val{true}) -> PivotedCholesky -The same as `cholfact`, but saves space by overwriting the input `A`, instead of creating a copy. +The same as `cholfact`, but saves space by overwriting the input `A`, instead +of creating a copy. An `InexactError` exception is thrown if the +factorisation produces a number not representable by the element type of `A`, +e.g. for integer types. """ cholfact!(A::StridedMatrix, uplo::Symbol, ::Type{Val{true}}; tol = 0.0) = throw(ArgumentError("generic pivoted Cholesky fectorization is not implemented yet")) diff --git a/doc/stdlib/linalg.rst b/doc/stdlib/linalg.rst index 3e6192da0edc6..28039144a51a0 100644 --- a/doc/stdlib/linalg.rst +++ b/doc/stdlib/linalg.rst @@ -155,7 +155,7 @@ Linear algebra functions in Julia are largely implemented by calling functions f .. Docstring generated from Julia source - ``lufact!`` is the same as :func:`lufact`\ , but saves space by overwriting the input ``A``\ , instead of creating a copy. For sparse ``A`` the ``nzval`` field is not overwritten but the index fields, ``colptr`` and ``rowval`` are decremented in place, converting from 1-based indices to 0-based indices. + ``lufact!`` is the same as :func:`lufact`\ , but saves space by overwriting the input ``A``\ , instead of creating a copy. An ``InexactError`` exception is thrown if the factorisation produces a number not representable by the element type of ``A``\ , e.g. for integer types. .. function:: chol(A::AbstractMatrix) -> U @@ -209,13 +209,13 @@ Linear algebra functions in Julia are largely implemented by calling functions f .. Docstring generated from Julia source - The same as ``cholfact``\ , but saves space by overwriting the input ``A``\ , instead of creating a copy. + The same as ``cholfact``\ , but saves space by overwriting the input ``A``\ , instead of creating a copy. An ``InexactError`` exception is thrown if the factorisation produces a number not representable by the element type of ``A``\ , e.g. for integer types. .. function:: cholfact!(A::StridedMatrix, uplo::Symbol, Val{true}) -> PivotedCholesky .. Docstring generated from Julia source - The same as ``cholfact``\ , but saves space by overwriting the input ``A``\ , instead of creating a copy. + The same as ``cholfact``\ , but saves space by overwriting the input ``A``\ , instead of creating a copy. An ``InexactError`` exception is thrown if the factorisation produces a number not representable by the element type of ``A``\ , e.g. for integer types. .. currentmodule:: Base.LinAlg @@ -395,7 +395,7 @@ Linear algebra functions in Julia are largely implemented by calling functions f .. Docstring generated from Julia source - ``qrfact!`` is the same as :func:`qrfact` when ``A`` is a subtype of ``StridedMatrix``\ , but saves space by overwriting the input ``A``\ , instead of creating a copy. + ``qrfact!`` is the same as :func:`qrfact` when ``A`` is a subtype of ``StridedMatrix``\ , but saves space by overwriting the input ``A``\ , instead of creating a copy. An ``InexactError`` exception is thrown if the factorisation produces a number not representable by the element type of ``A``\ , e.g. for integer types. .. function:: full(QRCompactWYQ[, thin=true]) -> Matrix @@ -816,7 +816,7 @@ Linear algebra functions in Julia are largely implemented by calling functions f Scale an array ``A`` by a scalar ``b`` overwriting ``A`` in-place. - If ``A`` is a matrix and ``b`` is a vector, then ``scale!(A,b)`` scales each column ``i`` of ``A`` by ``b[i]`` (similar to ``A*Diagonal(b)``\ ), while ``scale!(b,A)`` scales each row ``i`` of ``A`` by ``b[i]`` (similar to ``Diagonal(b)*A``\ ), again operating in-place on ``A``\ . + If ``A`` is a matrix and ``b`` is a vector, then ``scale!(A,b)`` scales each column ``i`` of ``A`` by ``b[i]`` (similar to ``A*Diagonal(b)``\ ), while ``scale!(b,A)`` scales each row ``i`` of ``A`` by ``b[i]`` (similar to ``Diagonal(b)*A``\ ), again operating in-place on ``A``\ . An ``InexactError`` exception is thrown if the scaling produces a number not representable by the element type of ``A``\ , e.g. for integer types. .. function:: Tridiagonal(dl, d, du)