[X] I have checked that this issue has not already been reported.
[X] I have confirmed this bug exists on the latest version of Polars.
Reproducible example
import polars as pl
u64_max = 2**64 - 1
s = pl.Series([[u64_max]], dtype=pl.Array(pl.UInt64, 1))
print(s)
Log output
Traceback (most recent call last):
File "/home/stijn/code/polars/py-polars/repro.py", line 19, in <module>
print(pl.Series([[u64_max]], dtype=pl.Array(pl.UInt64, 1)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/stijn/code/polars/py-polars/polars/series/series.py", line 312, in __init__
self._s = sequence_to_pyseries(
^^^^^^^^^^^^^^^^^^^^^
File "/home/stijn/code/polars/py-polars/polars/_utils/construction/series.py", line 138, in sequence_to_pyseries
pyseries = _construct_series_with_fallbacks(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/stijn/code/polars/py-polars/polars/_utils/construction/series.py", line 329, in _construct_series_with_fallbacks
return constructor(name, values, strict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/stijn/code/polars/py-polars/polars/series/series.py", line 312, in __init__
self._s = sequence_to_pyseries(
^^^^^^^^^^^^^^^^^^^^^
File "/home/stijn/code/polars/py-polars/polars/_utils/construction/series.py", line 313, in sequence_to_pyseries
return _construct_series_with_fallbacks(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/stijn/code/polars/py-polars/polars/_utils/construction/series.py", line 329, in _construct_series_with_fallbacks
return constructor(name, values, strict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
OverflowError: Python int too large to convert to C long
Issue description
Issue in the constructor. This works fine for a List(UInt64) or a plain UInt64.
Checks
Reproducible example
Log output
Issue description
Issue in the constructor. This works fine for a
List(UInt64)
or a plainUInt64
.Expected behavior
Should work.
Installed versions
main