>>> Ne['State_1_spe_sum'].shape
(3, 1)
>>> Ne['State_1_inc'].shape
(63, 1)
>>> np.vstack((Ne['State_1_spe_sum'], Ne['State_1_inc']))
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-58-2c1ac75279f6> in <module>
----> 1 np.vstack((Ne['State_1_spe_sum'], Ne['State_1_inc']))
<__array_function__ internals> in vstack(*args, **kwargs)
~\anaconda3\lib\site-packages\numpy\core\shape_base.py in vstack(tup)
281 if not isinstance(arrs, list):
282 arrs = [arrs]
--> 283 return _nx.concatenate(arrs, 0)
284
285
<__array_function__ internals> in concatenate(*args, **kwargs)
TypeError: invalid type promotion
It is to my understanding that stacking arrays using numpy vstack requires the arrays to have the same dimensions and column (for vstacking). I met the requirements, but why do I keep getting this error? I tried doing the np.concatenate
but it's giving me the same error. Can anybody help me understand what's going on?