JuliaLang / JuliaLang/LinearAlgebra.jl
Deprecate norm(x,0)
- Dominant language
- Julia
- Stars
- 77
- Forks
- 65
- Avg merge
- 3d 23h
- Merged PRs (30d)
- 10
Description
It's not a norm and it's not `p` (in the same way as `norm(x,p)` for `p>0`). See the discussion in https://github.com/JuliaLang/julia/issues/30631. It currently behaves as `norm(x,p)^p -> norm(x,0)` in `p` so it's questionable to bundle this functionality inside `norm(x,p)`. Sure, it can be useful to count the number of non-zeros in an array but `count(!iszero, x)` should be just fine for that.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reading the norm(x,p) entry point and the discussion in JuliaLang/julia#30631 to understand the proposed API change. Trace how norm(x,0) is currently handled and identify the relevant existing tests. Done means the deprecated behavior is addressed consistently and users are directed toward count(!iszero, x) for counting nonzeros.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100