DataArray aware `pint.context`
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
Research direction
No files or tests are named. Start by tracing the DataArray.pint.to("nm") accessor and reviewing how Pint contexts and decorators accept variables; clarify whether upstream Pint support is required. Done would mean an agreed API and tests showing a context variable can be obtained from the current DataArray coordinate.
Written by the indexing model from the issue text.
Description
For example, consider the spectroscopy context:
@context(n=1) spectroscopy = sp
There the conversion depends on the variable n used. Now, consider a DataArray/DataSet where n is a dimension/coordinate. Then when calling DataArray.pint.to("nm") we would want the variable n to be dynamically imported from the current context of the DataArray coordinate.
API-wise I am not sure how that would work, maybe by passing a list/dict of context objects (+ variables)? This might also involve upstream pint support for more complicated context and decorators.
- Dominant language
- Python
- Stars
- 119
- Forks
- 15
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- Has a 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 xarray-contrib/pint-xarray
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
xarray-contrib/pint-xarray#362 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
xarray-contrib/pint-xarray#361 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
xarray-contrib/pint-xarray#303 · 3 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
xarray-contrib/pint-xarray#271 · 7 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
xarray-contrib/pint-xarray#269 · 3 comments ·
All issues in xarray-contrib/pint-xarray
Similar issues
-
namespace operations
Difficulty 1/5 Under an hour Newbie friendliness 72/100
EclipseFdn/open-vsx.org#13737 ·
Maintainers usually reply within 1 day
-
Zero-token evaluations are treated as missing cost in selectionPossibly taken @sylvesterkaczmarek claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
google-research/rrsi#6 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
aws-samples/sample-aws-genai-db-modernizer#294 ·
Maintainers usually reply within 1 day
-
feedback simulation workshop
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
githubnext/gh-aw-workshop#4174 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
WingedGuardian/GENesis-AGI#2852 ·
Maintainers usually reply within 1 day