# Where is lufact()?

**URL:** <https://discourse.julialang.org/t/where-is-lufact/56881>\
**Category:** General Usage\
**Tags:** question\
**Created:** [March 10, 2021, 1:34pm UTC](https://discourse.julialang.org/t/where-is-lufact/56881 "2021-03-10T13:34:30Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![compleat](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/compleat/32/8958_2.png) [@compleat](https://discourse.julialang.org/u/compleat)\
**Post date:** [March 10, 2021, 1:34pm UTC](https://discourse.julialang.org/t/where-is-lufact/56881/1 "2021-03-10T13:34:31Z")

</div>

Hi All. Apologies for this, but after 2 years of Julia usage, I still feel like a ‘newbie’ sometimes.

I see reference all over the place to ‘lufact()’ but I have tried adding package after package (LinearAlgebra, LinAlg, etc.) but no matter what I do, I get

```julia
UndefVarError: lufact not defined

```

I usually don’t need this so haven’t used it before.

I wonder, firstly, if someone can help me with this, and secondly, if in general there is a ‘reverse directory’ for commonly-used functions - in order to find out which package one needs to load. Believe it or not, most documentation in Julia referring to functions seems to omit this (vital) piece of information.

Thanks for any help!

---

<div class="post-metadata">

**Author:** ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Post date:** [March 10, 2021, 1:36pm UTC](https://discourse.julialang.org/t/where-is-lufact/56881/2 "2021-03-10T13:36:25Z")

</div>

It is just called `lu` now (since Julia 1.0). It is defined in the standard library `LinearAlgebra`, so you need to import that.

---

<div class="post-metadata">

**Author:** ![compleat](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/compleat/32/8958_2.png) [@compleat](https://discourse.julialang.org/u/compleat)\
**Post date:** [March 10, 2021, 1:51pm UTC](https://discourse.julialang.org/t/where-is-lufact/56881/3 "2021-03-10T13:51:36Z")

</div>

Thank you!

Is there a way to find which functions are in which package? [Or maybe even deprecations?]

---

<div class="post-metadata">

**Author:** ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Post date:** [March 10, 2021, 1:56pm UTC](https://discourse.julialang.org/t/where-is-lufact/56881/4 "2021-03-10T13:56:01Z")

</div>

For this particular case you can use the Julia 0.7 release to figure it out (0.7 is just 1.0 with deprecations):

```julia
julia> lufact(rand(2,2))
WARNING: Base.lufact is deprecated: it has been moved to the standard library package `LinearAlgebra`.
Add `using LinearAlgebra` to your imports.
 in module Main
┌ Warning: `lufact(A::Union{AbstractMatrix{T}, AbstractMatrix{Complex{T}}}, pivot::Union{Val{false}, Val{true}}=Val(true)) where T <: AbstractFloat` is deprecated, use `lu(A, pivot)` instead.
│ caller = lufact(::Array{Float64,2}) at deprecated.jl:54
└ @ LinearAlgebra ./deprecated.jl:54

```

In general I would just look at the imports of the code where you find a function. You could also check out the [code search](https://juliahub.com/ui/CodeSearch) and [repo search](https://juliahub.com/ui/RepoSearch) from JuliaHub. I don’t know what the difference is.

---

<div class="post-metadata">

**Author:** ![compleat](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/compleat/32/8958_2.png) [@compleat](https://discourse.julialang.org/u/compleat)\
**Post date:** [March 10, 2021, 1:59pm UTC](https://discourse.julialang.org/t/where-is-lufact/56881/5 "2021-03-10T13:59:49Z")

</div>

OK - thanks - I’ll try those latter.
