Skip to content

__pow__ method incompatible with downstream subclasses #900

@rosteen

Description

@rosteen

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 astropy/specutils#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

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugProbably a bug.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions