__pow__ method incompatible with downstream subclasses
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
Research direction
Start by locating the NDCube.pow method and inspect how it uses _new_instance. Reproduce the traceback described in specutils issue 1279, then verify arithmetic with downstream specutils.Spectrum objects no longer fails and compare the behavior with the workaround in specutils pull request 1291.
Written by the indexing model from the issue text.
Description
Describe the bug
The use of _new_instance in the NDCube.__pow__ method was causing a traceback when doing arithmetic with downstream specutils.Spectrum objects that inherit from NDCube. See here for a description/traceback. I worked around this in https://github.com/astropy/specutils/pull/1291 but it might be worth updating the method here to avoid this.
To Reproduce
See linked specutils issue above.
Screenshots
No response
System Details
- ndcube 2.3.4
Installation method
No response
- Dominant language
- Python
- Stars
- 49
- Forks
- 56
- Avg merge
- 5h 54m
- Merged PRs (30d)
- 9
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 sunpy/ndcube
-
Bug
Difficulty 4/5 3-5 days Newbie friendliness 38/100
-
Feature Request
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
Feature Request
Difficulty 4/5 3-5 days Newbie friendliness 42/100
-
Discussion Upstream Fix Required
Difficulty 5/5 Over a week Newbie friendliness 25/100
Similar issues
-
documentation help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
simonw/sqlite-utils#872 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100