Most likely you have collected a list of arrays of different sizes, perhaps some are b/w and others are color:
In [17]: alist = []
In [18]: alist.append(np.ones((300,300))) # bw
In [19]: alist.append(np.ones((300,300,3))) # color
In [20]: np.array(alist)
/usr/local/bin/ipython3:1: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray
#!/usr/bin/python3
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-20-7512d762195a> in <module>
----> 1 np.array(alist)
ValueError: could not broadcast input array from shape (300,300,3) into shape (300,300)
v1.19 gives us a warning when we try to make a array from arrays that differ in shape. Sometimes that still gives us an object dtype array, but with this combination of shapes, the result is your error.
===
An equivalent way of combining the arrays into one is with np.stack. If it works the result is the same; if not, the error is different:
In [21]: np.stack(alist)
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-21-724d9c1d0554> in <module>
----> 1 np.stack(alist)
<__array_function__ internals> in stack(*args, **kwargs)
/usr/local/lib/python3.6/dist-packages/numpy/core/shape_base.py in stack(arrays, axis, out)
425 shapes = {arr.shape for arr in arrays}
426 if len(shapes) != 1:
--> 427 raise ValueError('all input arrays must have the same shape')
428
429 result_ndim = arrays[0].ndim + 1
ValueError: all input arrays must have the same shape