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
broadcast_binary_elementwise
pl.Series(['1', '43242', '121']).str.zfill(pl.Series([2, 3]))
shape: (2,) Series: '' [str] [ "01" "43242" ]
The last element of the right-hand-size was silently discarded
I think it should raise a ShapeError
ShapeError
--------Version info--------- Polars: 0.20.23 Index type: UInt32 Platform: Linux-5.15.146.1-microsoft-standard-WSL2-x86_64-with-glibc2.35 Python: 3.11.9 (main, Apr 6 2024, 17:59:24) [GCC 11.4.0] ----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> hvplot: 0.9.2 matplotlib: 3.8.4 nest_asyncio: 1.6.0 numpy: 1.26.4 openpyxl: <not installed> pandas: 2.2.2 pyarrow: 15.0.2 pydantic: <not installed> pyiceberg: <not installed> pyxlsb: <not installed> sqlalchemy: <not installed> xlsx2csv: <not installed> xlsxwriter: <not installed>
The text was updated successfully, but these errors were encountered:
This should be handled by zfill before going into broadcast I would say. zip also truncates.
zfill
broadcast
zip
Now, I agree this is error prone, so maybe we should add a shape assert to ensure we don't misuse it.
Sorry, something went wrong.
No branches or pull requests
Checks
Reproducible example
Log output
Issue description
The last element of the right-hand-size was silently discarded
Expected behavior
I think it should raise a
ShapeError
Installed versions
The text was updated successfully, but these errors were encountered: