Skip to content

Commit f4ac651

Browse files
Why an index (#366)
* Add 'why an index' custom index tutorial notebook Initial draft of intermediate/indexing/why-an-index.ipynb: an intuition-first tutorial on why xarray needs indexes and when to build a custom one. * Add handoff notes for why-an-index tutorial work * wip * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Remove local handoff notes from version control The handoff/session notes under notes/ are local working docs and should not be tracked (they were appearing in the draft PR diff). Untrack the handoff note and gitignore notes/ so working notes stay out of git. * fix * wip * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * WIP * Dedupe and reshape why-an-index notebook - Collapse the merge-duplicated notebook down to a single copy - Simplify PeriodicIndex to a scalar-query exercise with an explicit input/return contract; blank the body to hints + a runnable stub and add an attach-and-call demo that prints what sel receives - Rename SliceRuler to DIYRangeIndex and give it the same exercise scaffolding (contract comment, print of received dict, stub, demo) - Generalize the CoordinateTransform forward/reverse description - Remove the 2-D affine grid section; renumber the fisheye section to step 2 of 2 and trim the outline accordingly * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Remove stray TODO/placeholder prose from why-an-index * Skip why-an-index notebook in codespell (inline base64 image) * Fix ruff errors: drop unused var, discard bare expr, define line_x * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent ac73256 commit f4ac651

3 files changed

Lines changed: 1012 additions & 1 deletion

File tree

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,3 +124,5 @@ venv.bak/
124124
# pixi environments
125125
.pixi
126126
*.egg-info
127+
128+
notes/

intermediate/indexing/why-an-index.ipynb

Lines changed: 1009 additions & 0 deletions
Large diffs are not rendered by default.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ fixable = ["I"]
5050

5151
[tool.codespell]
5252
ignore-words-list = "nd"
53-
skip = "pixi.lock,.pixi,qaqc.yaml"
53+
skip = "pixi.lock,.pixi,qaqc.yaml,intermediate/indexing/why-an-index.ipynb"
5454

5555
[tool.pixi.workspace]
5656
name = "xarray-tutorial"

0 commit comments

Comments
 (0)