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
Series
ZeroDivisionError
Description
Shifting an empty Series raises a ZeroDivisionError.
Example
>>> import static_frame as sf >>> sf.Series([]).shift(1) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/bucher/.env38/lib/python3.8/site-packages/static_frame/core/series.py", line 1981, in shift values = array_shift( File "/home/bucher/.env38/lib/python3.8/site-packages/static_frame/core/util.py", line 1600, in array_shift shift_mod = shift % array.shape[axis] ZeroDivisionError: integer division or modulo by zero
Platform
>>> import static_frame as sf >>> sf.Platform.display() <Series: platform> <Index> platform Linux-5.4.0-74-generic-x86_64-with-glibc2.27 sys.version 3.8.3 (default, May 25 2021, 09:38:21) [GCC 7.5.0] static-frame 0.8.13 numpy 1.17.4 pandas 0.24.2 xlsxwriter 1.1.2 openpyxl 2.5.4 xarray <ModuleNotFoundError> tables 3.6.1 pyarrow 0.17.0 msgpack <ModuleNotFoundError> msgpack_numpy <ModuleNotFoundError> <<U13> <object>
The text was updated successfully, but these errors were encountered:
Many thanks for isolating this issue. This has been fixed and will be part of the 0.8.14 release.
Sorry, something went wrong.
improved handling for zero-length arrays in array_shift, refs #345
2117b91
No branches or pull requests
Description
Shifting an empty
Series
raises aZeroDivisionError
.Example
Platform
The text was updated successfully, but these errors were encountered: