Skip to content

Commit

Permalink
Explicitly cast 'bins' as integer in 'rotate' function so that it can
Browse files Browse the repository at this point in the history
be used as a slice index in arrays
  • Loading branch information
ryanslynch authored and scottransom committed Nov 12, 2019
1 parent 154710b commit baeca26
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/python/psr_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1031,7 +1031,7 @@ def rotate(arr, bins):
rotate(arr, bins):
Return an array rotated by 'bins' places to the left
"""
bins = bins % len(arr)
bins = int(bins % len(arr))
if bins==0:
return arr
else:
Expand Down

0 comments on commit baeca26

Please sign in to comment.