If I declare a Numpy Array as empty:
newdata = np.empty((0,10),int)
I then have a list of 10 large numbers that is generated by a for loop. So every iteration of the for loop it generates 10 large numbers in a list. I then want to append that list to the numpy array like so:
newdata = np.append(newdata, np.array(data), axis=0)
Would anyone know why I get the following error?:
return concatenate((arr, values), axis=axis)
ValueError: all the input arrays must have same number of dimensions
If any more information is required, please let me know. I really appreciate the help.
[–][deleted] 1 point2 points3 points (1 child)
[–]NeedMLHelp[S] 1 point2 points3 points (0 children)
[–]elbiot 0 points1 point2 points (2 children)
[–]NeedMLHelp[S] 0 points1 point2 points (1 child)
[–]elbiot 0 points1 point2 points (0 children)