IndexError: boolean index did not match indexed array along dimension 0; dimension is 10 but corresponding boolean dimension is 6

这类错误是因为使用布尔类型对具体位置进行索引时,被索引的个数和布尔个数不对应。(a组数列有10个,bool只有6个,因此报错)
布尔索引错误
正确操作:把布尔个数改成十个
布尔索引错误

相关文章: