klaundal / lompe

MIT License
12 stars 8 forks source link

Fix reading errors as an array #32

Closed billetd closed 6 months ago

billetd commented 6 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 6 months ago

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

klaundal commented 6 months ago

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