Air pollution tutorial should show path to "vectorization"
Nobody has claimed this yet.
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
- 673
- Forks
- 229
- PR merge metrics
- No merged PRs in 30d
Contributor 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 ·
-
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 ·
-
enhancement infrastructure maintenance
Difficulty 4/5 3-5 days Newbie friendliness 25/100
numpy/numpy-tutorials#280 · 5 comments ·
All issues in numpy/numpy-tutorials
Similar issues
-
Area: Excel support
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
orbeon/orbeon-forms#7893 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
docToolchain/docToolchain#1705 ·
-
kb-infra-drift
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
OCHA-DAP/ds-knowledge-base#653 · 1 comment ·
-
area/dev-productivity area/disaster-recovery area/ipcei kind/enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
namespace operations
Difficulty 1/5 Under an hour Newbie friendliness 90/100
EclipseFdn/open-vsx.org#13419 ·