Skip to content
New issue

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

datetime to_numpy error #17417

Closed
2 tasks done
j5255089 opened this issue Jul 4, 2024 · 1 comment
Closed
2 tasks done

datetime to_numpy error #17417

j5255089 opened this issue Jul 4, 2024 · 1 comment
Labels
bug Something isn't working needs triage Awaiting prioritization by a maintainer python Related to Python Polars

Comments

@j5255089
Copy link

j5255089 commented Jul 4, 2024

Checks

  • I have checked that this issue has not already been reported.
  • I have confirmed this bug exists on the latest version of Polars.

Reproducible example

from datetime import datetime
import polars as pl
t = "2023-07-01T00:00:00+00:00"
pl.Series([datetime.fromisoformat(t)]).to_numpy()

Log output

在当前单元格或上一个单元格中执行代码时 Kernel 崩溃。
请查看单元格中的代码,以确定故障的可能原因。
单击[此处](https://aka.ms/vscodeJupyterKernelCrash)了解详细信息。
有关更多详细信息,请查看 Jupyter [log](command:jupyter.viewOutput)。

10:29:17.888 [info] Process Execution: d:\workspace\chuizhi_io\.venv\Scripts\python.exe c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.6.0-win32-x64\pythonFiles\printJupyterDataDir.py
10:29:22.057 [error] Disposing session as kernel process died ExitCode: 3221225477, Reason:

Issue description

null

Expected behavior

Expect to get converted numpy datetime64 data

Installed versions

--------Version info---------
Polars:               1.0.0
Index type:           UInt32
Platform:             Windows-11-10.0.22631-SP0
Python:               3.12.2 (tags/v3.12.2:6abddd9, Feb  6 2024, 21:26:36) [MSC v.1937 64 bit (AMD64)]

----Optional dependencies----
adbc_driver_manager:  <not installed>
cloudpickle:          3.0.0
connectorx:           <not installed>
deltalake:            <not installed>
fastexcel:            <not installed>
fsspec:               2024.3.1
gevent:               <not installed>
great_tables:         <not installed>
hvplot:               <not installed>
matplotlib:           3.9.0
nest_asyncio:         1.6.0
numpy:                2.0.0
openpyxl:             <not installed>
pandas:               2.2.2
pyarrow:              16.1.0
pydantic:             2.7.1
pyiceberg:            <not installed>
sqlalchemy:           <not installed>
torch:                2.3.0+cu121
xlsx2csv:             <not installed>
xlsxwriter:           <not installed>
@j5255089 j5255089 added bug Something isn't working needs triage Awaiting prioritization by a maintainer python Related to Python Polars labels Jul 4, 2024
@stinodego
Copy link
Contributor

This is a known issue, see #17384

It has been fixed on main. Wait until the next Polars release or use NumPy < 2.0 until then.

@stinodego stinodego closed this as not planned Won't fix, can't repro, duplicate, stale Jul 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage Awaiting prioritization by a maintainer python Related to Python Polars
Projects
None yet
Development

No branches or pull requests

2 participants