Skip to content
Browse files

Fix-up logic for checking for zero-d arrays.

  • Loading branch information...
1 parent 963c4e4 commit ce5506f73bbb0233e825efef4f94dd39de05be07 @teoliphant teoliphant committed
Showing with 3 additions and 1 deletion.
  1. +3 −1 numpy/lib/index_tricks.py
View
4 numpy/lib/index_tricks.py
@@ -535,7 +535,9 @@ class ndindex(object):
# Fixing nditer would be more work but should be done eventually,
# and then this entire __new__ method can be removed.
def __new__(cls, *shape):
- if len(shape) == 0 or (len(shape) == 1 and len(shape[0]) == 0):
+ if len(shape) == 1 and isinstance(shape[0], tuple):
+ shape = shape[0]
+ if len(shape) == 0:
class zero_dim_iter(object):
def __init__(self):
self._N = 1

0 comments on commit ce5506f

Please sign in to comment.
Something went wrong with that request. Please try again.