Unit convert by DCplxTrans function

Hello Matthias,

Recently I study Ruby and try to understand more about K-layout base,
May I ask a question as a novice about " DCplxTrans " function when doing unit convert?

Ruby code works fine under right sequence as

RBA::Box * RBA::DCplxTrans

But get error if swap the position between box & DCplxTrans

RBA::DCplxTrans * RBA::Box  # error

Seems both two coding are acceptable under Python ( no sequence concern ), not sure the error comes from Ruby special syntax ?

Thanks
Vincent

Comments

  • Hi @Vincent,

    A transformation is always put in front of "*" (think Matrix multiplication), so this is they way things work on Ruby:

    The Python binding picks the reverse order as a fallback, so the opposite way works on Python too. But as this undocumented behavior may change, I'd not recommend that way.

    Matthias

  • Hello @Matthias,

    Yes, it makes sense as you said, matrix concept helps to well-understanding.

    Thanks
    Vincent

Sign In or Register to comment.