shape mismatch: value array of shape (2122,8) could not be broadcast to indexing result of shape(2122,7)
时间: 2024-01-08 22:57:17 浏览: 125
Influence of a laser profile in impedance mismatch techniques applied to carbon EOS measurement
This error message indicates that there is a mismatch between the shape of an array and the indexing result. Specifically, the array has a shape of (2122, 8), meaning it has 2122 rows and 8 columns, while the indexing result has a shape of (2122, 7), meaning it has 2122 rows and 7 columns.
This error can occur when trying to assign a value to a subset of an array that has a different shape than the value being assigned. For example, if you have an array with 8 columns and you try to assign a value to the 7th column of a subset of the array, you will get this error.
To fix this error, you need to make sure that the shape of the value being assigned matches the shape of the subset of the array being assigned to. You may need to reshape or transpose the value to match the shape of the array subset. Alternatively, you may need to adjust the indexing to select the correct subset of the array.
阅读全文