I\'m having a problem with np.append.
np.append
I\'m trying to duplicate the last column of 20x361 matrix n_list_converted by using the code below:>
n_list_converted
(n,) and (n,1) are not the same shape. Try casting the vector to an array by using the [:, None] notation:
[:, None]
n_lists = np.append(n_list_converted, n_last[:, None], axis=1)
Alternatively, when extracting n_last you can use
n_last
n_last = n_list_converted[:, -1:]
to get a (20, 1) array.
(20, 1)