shapes (9,) and (2,1) not aligned: 9 (dim 0) != 2 (dim 0)
时间: 2023-12-13 17:05:31 浏览: 105
This error message is indicating that there is a problem with the shapes of two arrays that you are trying to use in an operation. Specifically, one array has a shape of (9,), meaning it has 9 elements along a single dimension. The other array has a shape of (2,1), meaning it has 2 rows and 1 column.
The error message is telling you that these shapes are not aligned for the operation you are trying to perform. In this case, it looks like you may be trying to perform some kind of mathematical operation or calculation between the two arrays. However, because they have different shapes, this operation cannot be completed.
To resolve this error, you will need to ensure that the shapes of the two arrays are aligned correctly for the operation you are trying to perform. This may involve reshaping one or both arrays, or using a different operation that is compatible with the given shapes.
阅读全文