Can .pint.magnitude return a DataArray instead?
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
Research direction
Start by tracing the implementation and tests for DataArray.pint.magnitude, then compare its current NumPy result with DataArray.data.magnitude and DataArray.as_numpy(). Review the unresolved discussion to determine whether returning a DataArray is the intended API; done requires an agreed behavior and tests covering the resulting type and NumPy extraction path.
Written by the indexing model from the issue text.
Description
Currently DataArray.pint.magnitude returns a numpy array. Can it return a DataArray instead? We can always extract the numpy array using DataArray.data.magnitude.
Just realized I can also use DataArray.as_numpy() but perhaps this is still worth considering?
- Dominant language
- Python
- Stars
- 119
- Forks
- 15
- 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 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
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
zostera/django-bootstrap4#894 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
use-agent-os/agent-os#3276 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
zephyrproject-rtos/zephyr#119726 ·
-
area/auth bug comp/agent P3 platform/discord type/security
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
NousResearch/hermes-agent#117848 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
zilliztech/memsearch#759 ·