I have a numpy array ar1 with dimensions (1196, 14, 64, 1).
I have a numpy array ar2 with dimensions (1196,).
I want to combine these two because I want to shuffle them later. I thought that this was the kind of thing that zip was made for, but when I zip them together:
ar3 = np.asarray(zip(ar1,ar2))
then print(ar3.shape) gives ()
I have also tried np.concatenate but apparently all the input array dimensions for the concatenation axis must match exactly.
I tried np.hstack but I got all the input arrays must have same number of dimensions
How can I combine these two arrays that have the same size along axis 0? Perhaps I don't need to combine then and should just shuffle them separately using the same indices.
(I already actually combined and saved these arrays using numpy.savez, but when I load this file into my code, I assume that I have to separate them first and then recombine the in an array as I am trying to do. If I could just pull out a combines array from the .npz file then that would be even better)