diff options
author | Jamie Townsend <jamiehntownsend@gmail.com> | 2017-10-26 11:56:45 +0100 |
---|---|---|
committer | Jamie Townsend <jamiehntownsend@gmail.com> | 2017-11-03 11:13:46 +0000 |
commit | 2c1734b192e0d5cb3973b76f9319b18be2a44697 (patch) | |
tree | a44207a66e6031899cbe3d79452dd046176e82db /numpy/core/shape_base.py | |
parent | ad278f3bfea97636b18c8d699babdd02aa3cac5c (diff) | |
download | numpy-2c1734b192e0d5cb3973b76f9319b18be2a44697.tar.gz |
Correct empty list ndim
Diffstat (limited to 'numpy/core/shape_base.py')
-rw-r--r-- | numpy/core/shape_base.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/core/shape_base.py b/numpy/core/shape_base.py index 23e2ef57f..b7fe71310 100644 --- a/numpy/core/shape_base.py +++ b/numpy/core/shape_base.py @@ -419,7 +419,7 @@ def _block_check_depths_match(arrays, parent_index=[]): return first_index, max(arr_ndims) elif type(arrays) is list and len(arrays) == 0: # We've 'bottomed out' on an empty list - return parent_index + [None], _nx.ndim(arrays) + return parent_index + [None], 0 else: # We've 'bottomed out' - arrays is either a scalar or an array return parent_index, _nx.ndim(arrays) |