Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 7ec7d55a authored by hhakim's avatar hhakim
Browse files

Forbid slice step == 0 in pyfaust like numpy.

parent 60b9005f
Branches
Tags
No related merge requests found
...@@ -837,6 +837,8 @@ class Faust: ...@@ -837,6 +837,8 @@ class Faust:
if(len(out_indices[i]) == 0): raise empty_faust_except if(len(out_indices[i]) == 0): raise empty_faust_except
elif(out_indices[i].start >= out_indices[i].stop): elif(out_indices[i].start >= out_indices[i].stop):
raise empty_faust_except raise empty_faust_except
elif(out_indices[i].step == 0):
raise ValueError("slice step cannot be zero")
if(isinstance(out_indices[0],list) or if(isinstance(out_indices[0],list) or
isinstance(out_indices[1], list)): isinstance(out_indices[1], list)):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment