ndcube icon indicating copy to clipboard operation
ndcube copied to clipboard

NDMeta.rebin can't handle all inputs

Open Cadair opened this issue 5 months ago • 1 comments
trafficstars

Describe the bug

I'm pretty sure it breaks on -1 and 1 but I don't have a good MWE sorry

To Reproduce

No response

Screenshots

No response

System Details

No response

Installation method

No response

Cadair avatar Jun 19 '25 15:06 Cadair

I don't seem to be able to reproduce this bug. The below MWE works.

>>> import astropy.units as u
>>> from ndcube import NDCube

>>> meta = NDMeta({"exposure_time": np.arange(9)*u.s}, axes={"exposure_time": 0})
>>> meta.slice[1]
{'exposure_time': <Quantity 1. s>}
>>> meta.slice[-1]
{'exposure_time': <Quantity 8. s>}

DanRyanIrish avatar Jun 24 '25 08:06 DanRyanIrish