I am trying to hstack some values using np. However I get the following error:
Buffer has wrong number of dimensions (expected 1, got 2)
The line in which I stack is:
s= np.hstack((np.array([cell_name, freq]).reshape((1,-1)),pred,y1_a,y1_b,y1_c,y2_a,y2_b,y2_c,y3_a,y3_b,y3_c,df[output_name].iloc[i].values.reshape(1,-1)))
I checked the shape of every element in the array, they all have the same first dimension of 1. Any ideas?
ps: the length of the dataframe I am trying to work on is 2, and this stacking is done in for loop as follows:
for i in range(df.values.shape[0]):
s= np.hstack((np.array([cell_name, freq]).reshape((1,-1)),pred,y1_a,y1_b,y1_c,y2_a,y2_b,y2_c,y3_a,y3_b,y3_c,df[output_name].iloc[i].values.reshape(1,-1)))