klaundal / lompe

MIT License
15 stars 9 forks source link

Fix reading errors as an array #32

Closed billetd closed 10 months ago

billetd commented 10 months ago

As it stands, passing an array to the error keyword in the Data class doesn't work, as checks if error == 0:. This fails if error is an array of the same length of values.

A simple fix for this is to check if error has a size of 1, which is also equal to zero. The size check is actually done later at L187 of data.py, but the code will fail before getting to that point.

billetd commented 10 months ago

Just realised this doesn't work if you give a single value for error. Fixing now.

klaundal commented 10 months ago

Thanks! Weird that we had not encountered that before. Must have used scalar values for the error every time.