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
We allow comparisons of unicode with byte-valued columns using a unicode sandwich, but this fails in the corner-case where the column is multidimensional and we take a single element from it:
A fix might be to convert the result to unicode or to use an ndarray subclass that still contains the unicode sandwich (but is otherwise a plain ndarray).
I suspect this is a bit of a rabbit hole... with new numpy dtypes is there hope for a single-byte character type anywhere on the horizon before I'm retired?
We allow comparisons of unicode with byte-valued columns using a unicode sandwich, but this fails in the corner-case where the column is multidimensional and we take a single element from it:
EDIT (2024-01-11): now gives
[False, False]
so still an issue.The reason is that for multi-D columns, access of any given
Column
row just returns a plainndarray
, which does not know about the unicode sandwich: https://github.com/astropy/astropy/blob/master/astropy/table/_column_mixins.pyx#L54-L55A fix might be to convert the result to unicode or to use an
ndarray
subclass that still contains the unicode sandwich (but is otherwise a plainndarray
).cc @taldcroft
p.s. Found while trying a new
Masked
class for creating a newMaskedColumn
.The text was updated successfully, but these errors were encountered: