You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
QTable converts numbers to float, if unit is unknown #15447
When loading a fits file with a numeric column in which is formatted as an int with an associated unit that QTable does not recognize, the column is changed to a float.
Expected behavior
Report a warning about the unit, but do not change the dtype of the data (this is what happens when I read with Table).
There is tentative PR for fixing this at #12505. Note that there was quite a bit of discussion of exactly when one should upcast, but I think it was most of the way there...
Activity
pllim commentedon Oct 5, 2023
Whether the unit is valid or not doesn't matter. Quantity always cast the values to float. I get the same behavior even if I set the unit to meters.
I think this behavior was reported elsewhere (even when QTable is not involved) but I cannot find the issue now, maybe @mhvk remembers.
mhvk commentedon Oct 12, 2023
There is tentative PR for fixing this at #12505. Note that there was quite a bit of discussion of exactly when one should upcast, but I think it was most of the way there...
taldcroft commentedon Sep 23, 2026
Fixed by #20273.