Closed
Description
There are too many functions in dtypes.cast
, making it difficult to know which one to use in a given situation. e.g. when working with Index.insert
in #38102 I considered maybe_promote
, maybe_upcast
, maybe_casted_values
, find_common_type
.
Best case scenario we can de-duplicate some of these and just remove some of them, but failing that, I think we could find new homes for e.g. construct_1d_arraylike_from_scalar
, construct_1d_object_array_from_listlike
, construct_1d_ndarray_preserving_na
.