# What does the error "operands could not be broadcast together with shapes (415) (416)" mean? Caused by trying to filter large voltage changes

I've used the numpy module to measure voltages before and after a contingency and calculate the change. I can print the results so the calculation does take place.

However when I try to filter the results with an if statement so it only prints the results greater than 10% I get the error:

"operands could not be broadcast together with shapes (415) (416)"

Any idea on what the problem is?

Hi Peter, can you post some small example code showing how the if statement is written?

Without having seen it, I think it will be to do with a mismatched shaped matrix multiplication or operation somewhere. Numpy requires that matrix operations have the correct sized matrix inputs.

I can't remember now where the code is that I was referring to! If it shows up again I will post.

No worries, you are allowed to answer your own question if you know the answer. The website gives you some "award", but I forget the name of it..."Self learner"?

If anyone else has a similar problem post your code - we'd love to help fix it.