Replacement of eigs?

Given a matrix A I need to compute the eigenvector matching the dominating eigenvalue.

In 0.6 I used v = eigs(A, nev = 1, which=:LM)
I cannot find anything similar in 1.0.

How do I compute this eigenvector without computing all the others (as e.g. eigen does)?

It got moved out of Base to Arpack.jl:

using Arpack
v = eigs(A, nev = 1, which=:LM)

FWIW, 0.7 gives you the following more-informative error message:

ERROR: eigs has been moved to the package Arpack.jl.
Run `Pkg.add("Arpack")` to install it, restart Julia,
and then run `using Arpack` to load it.

Oh I see, sorry for the noise :blush:

New to Julia, have version 1.3
So to figure out the new name of a function, I would need to install julia 0.7 ?
I keep running into this issue, and currently search the web for ‘julia <old_function_name> deprecated’

Is there a better way to handle this? I am having no luck finding what realmax(Float64) might have turned into!

In general yes - using that function on 0.7 will give you a message telling you what the function has turned in to:

julia> versioninfo()
Julia Version 0.7.0

julia> realmax(Float64)
┌ Warning: `realmax` is deprecated, use `floatmax` instead.
│   caller = top-level scope at none:0
└ @ Core none:0

In your case, the equivalent is floatmax(Float64).

If you’re new to julia this shouldn’t be necessary though - are you trying to port older code or are you following an older tutorial?

I am looking at various notebooks, both to see julia examples and to read up on some algorithms.
I am really surprised at the number of deprecated functions, and the difficulty finding replacements.

I wonder if a list of deprecated functions and their replacement might be picked up by webcrawlers
to make it easier to search the web?

You don’t have to worry too much about this if you just started using Julia and using some Julia 1.x version .
There were many breaking changes from 0.6 to 1.0 (with 0.7 providing the deprecation warnings), as 1.0 was the first version with API stability guaranteed. Moving forward, breaking changes between different 1.x.y versions are not allowed, only new features and bug fixes. So if you write some code which works with Julia 1.3 you can be rest assured that it will also work for later 1.x versions of Julia.

When looking at tutorials treat ones that use v0.6 as possibly outdated and try to find newer ones if possible.
In general it is good to have a look at the official documentation when searching for some functionality, and as you have seen you can also search this forum (a lot of times someone already asked a similar question) or ask here.

Well, there are the Release News for 0.7 which has a list of deprecations as well, but simply running the code in 0.7 will in general be easier than checking that list.

As Stefan writes in the post I linked at the beginning of this thread, the 0.7 release exists for exactly this purpose, as it was the last 0.x release before 1.0.

In any case, using 1.3 is the best choice - all code newer than 1.0 is compatible with it.

1 Like

Thank you for the pointer to the list of deprecations!