wish help you to fix your issue I have an array of numbers and I'd like to create another array that represents the rank of each item in the first array. I'm using Python and NumPy. , Use slicing on the left-hand side in the last step:
will be helpful for those in need numpy.transpose(..) is a function that can permutate the axes in any order. If I understood it correctly, you basically want the third and fourth axis to be the first and second axis of the new matrix, and the old first and second matrix to be the new third and fourth axis.
Hope that helps I'm developing a simple Artificial Intelligence for a college project and so far it has worked until it randomly began creating a numpy array inside another numpy array. One of the lists that are being converted is a dataset that I've created myself that then is iterated through and each image is read by cv2 and added to a new list. This new list is then converted into a numpy array (this is the one that causes the problem). A second, smaller list (test images) goes through the same process and comes out with the desired result. , The problem is in
for i in range (0, len(images)):
img = cv2.imread(images[i])