Air pollution tutorial should show path to "vectorization"
@ankur0904 is already working on this.
Since Nov 10, 2023.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 38/100
- Issue type
- Documentation
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- numpy
- Domain
- documentation
Research direction
Start with the air pollution tutorial and locate the existing vectorized function used to calculate the AQI. Compare how the tutorial could present the vectorize approach alongside the searchsorted and interpolation ideas; done means the tutorial explains these alternatives and does not imply vectorize is the only path.
Written by the indexing model from the issue text.
Description
The air polution tutorial has a "vectorized" function to calculte the AIQ (IIRC). This can be vectorized using searchsorted (which is a bit much work, but not too tricky).
I am also almost completely certain that it can also be replaced with a single call to np.interp1d.
Having the "vectorize" version seems good, but doesn't fully leverage the concepts that NumPy provides. I think it would be great arc to keep it, but then also show the final interp and maybe even the searchsorted idea. (I honestly don't like stopping at vectorize becuzse it makes seems that vectorize is a common approach, when I consider it more of a fallback solution – whether used a lot in practice or not.)
- Dominant language
- No language data
- Stars
- 686
- Forks
- 230
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 2
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from numpy/numpy-tutorials
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 68/100
numpy/numpy-tutorials#228 ·
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
numpy/numpy-tutorials#150 · 2 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 58/100
numpy/numpy-tutorials#315 · 1 comment ·
-
enhancement
Difficulty 3/5 1-2 days Newbie friendliness 45/100
numpy/numpy-tutorials#305 · 1 reaction ·
-
maintenance
Difficulty 4/5 3-5 days Newbie friendliness 48/100
numpy/numpy-tutorials#283 · 1 reaction ·
All issues in numpy/numpy-tutorials
Similar issues
-
bug math graph
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
facebookresearch/atlas-lean#10288 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 86/100
superlinked/sie#1033 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 1-3 hours Newbie friendliness 83/100
router-for-me/CLIProxyAPI#8521 ·
Maintainers usually reply within 10 days
-
15.0
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
documentation good first issue P3-Low
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
basictech01/uniun#328 ·
Maintainers usually reply within 2 days