Problem statement
SymPy 1.4 does not allow to construct empty Array (see code below). Is this the intended behavior?
>>> import sympy
KeyboardInterrupt
>>> import sympy
>>> from sympy import Array
>>> sympy.__version__
'1.4'
>>> a = Array([])
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/hcui7/miniconda3/envs/a/lib/python3.7/site-packages/sympy/tensor/array/dense_ndim_array.py", line 130, in __new__
return cls._new(iterable, shape, **kwargs)
File "/Users/hcui7/miniconda3/envs/a/lib/python3.7/site-packages/sympy/tensor/array/dense_ndim_array.py", line 136, in _new
shape, flat_list = cls._handle_ndarray_creation_inputs(iterable, shape, **kwargs)
File "/Users/hcui7/miniconda3/envs/a/lib/python3.7/site-packages/sympy/tensor/array/ndim_array.py", line 142, in _handle_ndarray_creation_inputs
iterable, shape = cls._scan_iterable_shape(iterable)
File "/Users/hcui7/miniconda3/envs/a/lib/python3.7/site-packages/sympy/tensor/array/ndim_array.py", line 127, in _scan_iterable_shape
return f(iterable)
File "/Users/hcui7/miniconda3/envs/a/lib/python3.7/site-packages/sympy/tensor/array/ndim_array.py", line 120, in f
elems, shapes = zip(*[f(i) for i in pointer])
ValueError: not enough values to unpack (expected 2, got 0)@czgdp1807
The environment starts at commit
c5cef2499d6e (sympy/sympy 1.11), dependencies installed and tests runnable from the first minute. You are graded by hidden tests taken from the fix that was actually merged upstream.