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

Change in generic_vecnorms #23913

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Change in generic_vecnorms #23913

wants to merge 1 commit into from

Commits on Sep 28, 2017

  1. Update generic.jl

    By default, `generic_vecnorm` of `1,2,Inf,-Inf,p`, takes `norm(v)^p` (taking `p` as the general case which includes 1,2,Inf,-Inf). Normally, `v` is a `Number` so `norm(v)` just applies the 
    ```julia @inline vecnorm(x::Number, p::Real=2) = p == 0 ? (x==0 ? zero(abs(x)) : oneunit(abs(x))) : abs(x) ```
    method.
    This change is made because in some _strange_ cases, `v` is not a `Number` but an `Array` and it's more convinient to take `norm(v,p)` instead of norm(v).
    blas-ko authored Sep 28, 2017
    Configuration menu
    Copy the full SHA
    45a9039 View commit details
    Browse the repository at this point in the history