Closed pbartholomew08 closed 2 months ago
If that's the case this is confusing indeed. Though it is kind of in line with the arguments ordering in x3d2. The output are placed first and then followed by the inputs, so it is a bit similar here.
Unit tests (in linked PR) seem to pass OK, so I'm not sure what was going on in my code when I opened this. Still, more tests don't hurt :)
ah ok yeah, I was getting confused by reading your test :)
Just to check there is no confusion, the test checks that
DIR_X -> DIR_Y == RDR_X2Y DIR_X -> DIR_Z == RDR_X2Z RDR_X2Y == DIR_X -> DIR_Y RDR_X2Z == DIR_X -> DIR_Z
etc.
Yes, that's what I would expect too. I meant I was getting confused reading your test after reading your issue here because it didn't match. But the tests and x3d2 behaviour are what they should be
Problem description calling
get_rdr_from_dirs(DIR_X, DIR_C)
returnsRDR_C2X
whenRDR_X2C
would be expected. The 2D map is created by usingreshape
, this appears to be a row/column error.Proposed solution Add
order
keyword to the map constructor to ensure correct ordering, verify with unit tests (and also forget_dirs_from_rdr
).