We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
I have confirmed this bug exists on the main branch of pandas.
import pyarrow as pa import pandas as pd s = pd.Series([1, 2, 3], dtype=pd.ArrowDtype(pa.float64())) pd.DataFrame({"x": s, "y": s}).to_numpy().dtype """dtype('O')"""
Other issues such as #54808 mention to_numpy() yielding object types in the presence of nulls. Here I got object types even without nulls.
to_numpy()
Output should be np.float64 array.
commit : a60ad39 python : 3.11.3.final.0 python-bits : 64 OS : Linux OS-release : 4.18.0-425.19.2.el8_7.x86_64 Version : #1 SMP Fri Mar 17 01:52:38 EDT 2023 machine : x86_64 processor : x86_64 byteorder : little LC_ALL : None LANG : en_US.utf8 LOCALE : en_US.UTF-8
pandas : 2.1.2 numpy : 1.25.2 pytz : 2023.3 dateutil : 2.8.2 setuptools : 67.6.1 pip : 23.0.1 Cython : 3.0.0 pytest : 7.4.0 hypothesis : None sphinx : 6.2.1 blosc : None feather : None xlsxwriter : 3.1.2 lxml.etree : None html5lib : None pymysql : None psycopg2 : None jinja2 : 3.1.2 IPython : 8.8.0 pandas_datareader : None bs4 : 4.12.2 bottleneck : None dataframe-api-compat: None fastparquet : None fsspec : 2023.6.0 gcsfs : None matplotlib : 3.7.2 numba : 0.58.0 numexpr : None odfpy : None openpyxl : 3.1.2 pandas_gbq : None pyarrow : 14.0.0 pyreadstat : 1.2.1 pyxlsb : None s3fs : 2023.6.0 scipy : 1.11.2 sqlalchemy : 2.0.16 tables : None tabulate : None xarray : None xlrd : None zstandard : None tzdata : 2023.3 qtpy : None pyqt5 : None
The text was updated successfully, but these errors were encountered:
Thanks for the report. The core issue is based in #22791 so will close in favor of that issue
Sorry, something went wrong.
No branches or pull requests
Pandas version checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
Issue Description
Other issues such as #54808 mention
to_numpy()
yielding object types in the presence of nulls.Here I got object types even without nulls.
Expected Behavior
Output should be np.float64 array.
Installed Versions
INSTALLED VERSIONS
commit : a60ad39
python : 3.11.3.final.0
python-bits : 64
OS : Linux
OS-release : 4.18.0-425.19.2.el8_7.x86_64
Version : #1 SMP Fri Mar 17 01:52:38 EDT 2023
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : en_US.utf8
LOCALE : en_US.UTF-8
pandas : 2.1.2
numpy : 1.25.2
pytz : 2023.3
dateutil : 2.8.2
setuptools : 67.6.1
pip : 23.0.1
Cython : 3.0.0
pytest : 7.4.0
hypothesis : None
sphinx : 6.2.1
blosc : None
feather : None
xlsxwriter : 3.1.2
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 3.1.2
IPython : 8.8.0
pandas_datareader : None
bs4 : 4.12.2
bottleneck : None
dataframe-api-compat: None
fastparquet : None
fsspec : 2023.6.0
gcsfs : None
matplotlib : 3.7.2
numba : 0.58.0
numexpr : None
odfpy : None
openpyxl : 3.1.2
pandas_gbq : None
pyarrow : 14.0.0
pyreadstat : 1.2.1
pyxlsb : None
s3fs : 2023.6.0
scipy : 1.11.2
sqlalchemy : 2.0.16
tables : None
tabulate : None
xarray : None
xlrd : None
zstandard : None
tzdata : 2023.3
qtpy : None
pyqt5 : None
The text was updated successfully, but these errors were encountered: