Skip to content
Snippets Groups Projects
Commit 89416c6c authored by Andreas Klöckner's avatar Andreas Klöckner
Browse files

indices_in_shape: Accept pure-integer shapes

parent beee48e9
No related branches found
No related tags found
No related merge requests found
Pipeline #
......@@ -1072,6 +1072,9 @@ def wandering_element(length, wanderer=1, landscape=0):
def indices_in_shape(shape):
if isinstance(shape, int):
shape = (shape,)
if len(shape) == 0:
yield ()
elif len(shape) == 1:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment