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
Using the current main branch (2.1.0rc0+115.gca429943c7), if we convert an Arrow-backed boolean array to numpy, we get object dtype if there are missing values:
This follows pyarrow's behaviour of converting to a numpy array (and I think also makes sense, unless we might want to raise an error instead, but that's for another discussion).
But when a user specifies an na_value to avoid this issue of missing values with numpy, we still return an object dtype:
while if the specified na_value is valid for the default target bool dtype (as in the example above), we could perfectly well return a proper bool dtype array automatically (currently you would have to be explicit: to_numpy(np.bool_, na_value=False)).
The text was updated successfully, but these errors were encountered:
Using the current main branch (2.1.0rc0+115.gca429943c7), if we convert an Arrow-backed boolean array to numpy, we get object dtype if there are missing values:
This follows pyarrow's behaviour of converting to a numpy array (and I think also makes sense, unless we might want to raise an error instead, but that's for another discussion).
But when a user specifies an
na_value
to avoid this issue of missing values with numpy, we still return an object dtype:while if the specified
na_value
is valid for the default target bool dtype (as in the example above), we could perfectly well return a proper bool dtype array automatically (currently you would have to be explicit:to_numpy(np.bool_, na_value=False)
).The text was updated successfully, but these errors were encountered: