Closed
Description
xref numpy/numpy#17659
I would expect numpy to automatically convert such arrays into a float type and fill with np.nan. However, for some reason it converts it to object:
pd.DataFrame({'col': [1, np.nan, 3]}).astype('UInt8').values.dtype
which leads to errors like this one
np.nanmax(pd.DataFrame({'col': [1, np.nan, 3]}).astype('UInt8').values)
returns "TypeError: boolean value of NA is ambiguous"
Is that expected ?
Personally I don't have a strong opinion re: whether it's a good idea to support this