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

Shifting an empty Series raises a ZeroDivisionError. #345

Closed
brandtbucher opened this issue Jun 11, 2021 · 1 comment
Closed

Shifting an empty Series raises a ZeroDivisionError. #345

brandtbucher opened this issue Jun 11, 2021 · 1 comment

Comments

@brandtbucher
Copy link
Collaborator

brandtbucher commented Jun 11, 2021

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>
@flexatone
Copy link
Contributor

Many thanks for isolating this issue. This has been fixed and will be part of the 0.8.14 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants