Closed
Description
When I was developing #16237, I noticed that the API for checking dtype
is quite messy. We appear to have duplicate functionality, and the interface is not clear as to what we should accept.
I propose that for all such dtype
checking functions, we should accept ANY array-like and ANY dtype
OR type
object and cast any list
-like object to np.array
.
Also, I added several TODO
in that same file that I was hoping to get some feedback on. They stood out to me because they seemed either non-intuitive OR symptomatic of the API redundancy that I was referring to.
is_datetimetz
seems like a duplicate ofis_datetime64tz_dtype
. Do we need it?is_period
seems like a duplicate ofis_period_arraylike
. Do we need it?- Should
Period
be an instance ofPeriodDtype
? - Should
Interval
be an instance ofIntervalDtype
?