Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

norm(matrix) -> opnorm(matrix) in Julia 0.7 #55

Closed
stevengj opened this issue Jun 15, 2018 · 2 comments · Fixed by #57
Closed

norm(matrix) -> opnorm(matrix) in Julia 0.7 #55

stevengj opened this issue Jun 15, 2018 · 2 comments · Fixed by #57

Comments

@stevengj
Copy link

It looks like may be using norm(matrix). In Julia 0.7, this will compute the Frobenius norm (vecnorm in Julia 0.6), due to JuliaLang/julia#27401. If you want the induced/operator norm as in Julia 0.6, use opnorm(matrix) instead, or Compat.opnorm(matrix) to work in 0.6 and 0.7 (JuliaLang/Compat.jl#577).

Note that, for testing purposes, rather than @test norm(A - B) ≤ tol, it is usually preferred to do @test A ≈ B or @test A ≈ B rtol=... (which uses isapprox).

@dpo
Copy link
Member

dpo commented Jun 19, 2018

It looks like may be using norm(matrix). In Julia 0.7, this will compute the Frobenius norm (vecnorm in Julia 0.6), due to JuliaLang/julia#27401. If you want the induced/operator norm as in Julia 0.6, use opnorm(matrix) instead, or Compat.opnorm(matrix) to work in 0.6 and 0.7 (JuliaLang/Compat.jl#577).

Sorry, I'm not sure if this is a bug report, a heads up, or something else.

Note that, for testing purposes, rather than @test norm(A - B) ≤ tol, it is usually preferred to do @test A ≈ B or @test A ≈ B rtol=... (which uses isapprox).

Thanks.

@stevengj
Copy link
Author

stevengj commented Jun 19, 2018

This is a heads-up that the meaning of norm in code like your tests_lbfgs.jl will change, which may necessitate e.g. changing tolerances.

abelsiqueira added a commit to abelsiqueira/LinearOperators.jl that referenced this issue Jul 21, 2018
@dpo dpo closed this as completed in #57 Aug 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants