First of all, sorry for the big blob of changes, at this stage it's aways easier to refactor a lot of things than splitting in small atomic changes... In summary:
validation was not quite there yet; especially ndim guessing was failing regularly (reshape(-1, 2) was working for any array with even number of elements :P). I added a bunch of checks for data types and values that hopefully should ensure the object is indeed complying.
In here, we currently intermix 2 types of validation without distinction, which is probably bad: checking if thigns are correct (validate_cryopose) and enforcing correct things as much as possible (validate_positions). We should probably formalize this, because I can see cases where someone wants the positions in 3D no matter what (just pad it if 2D)
First of all, sorry for the big blob of changes, at this stage it's aways easier to refactor a lot of things than splitting in small atomic changes... In summary:
validation was not quite there yet; especially ndim guessing was failing regularly (
reshape(-1, 2)
was working for any array with even number of elements :P). I added a bunch of checks for data types and values that hopefully should ensure the object is indeed complying.In here, we currently intermix 2 types of validation without distinction, which is probably bad: checking if thigns are correct (
validate_cryopose
) and enforcing correct things as much as possible (validate_positions
). We should probably formalize this, because I can see cases where someone wants the positions in 3D no matter what (just pad it if 2D)