BUG: np.where
may not preserve Enum
type when used with a mix of Enums
defined using a custom class that inherits from both str
and Enum
#23423
Labels
Describe the issue:
Hi, when using the
np.where
function with an array ofEnums
defined using a custom class that inherits from bothstr
andEnum
, the resulting array does not preserve theEnum
type as expected.Reproduce the code example:
When
class TestEnum(Enum):
, it works well.Error message:
No response
Runtime information:
1.24.0
3.8.15 | packaged by conda-forge | (default, Nov 22 2022, 08:49:35)
[GCC 10.4.0]
Context for the issue:
xref BUG: enum not properly handled by fillna · Issue #51941 · pandas-dev/pandas
The text was updated successfully, but these errors were encountered: