cannot reshape array of size 192000 into shape (8,8,3)
时间: 2024-05-19 20:11:04 浏览: 9
This error occurs when you try to reshape an array with a certain size into a different shape that is not compatible with the original size. In this specific case, you are trying to reshape an array with a size of 192000 into a shape of (8,8,3), which requires a size of 192. Since the original size is not divisible by the desired shape size, the reshape operation fails and raises this error.
To fix this error, you need to either adjust the shape you want to reshape the array into or modify the size of the original array. For example, you could reshape the original array into a shape of (160,120,3), which has a compatible size of 57600. Alternatively, you could modify the size of the original array to be divisible by the desired shape size, such as reshaping an array of size 192 to (8,8,3).