Encode an array of axes names into an axis bitfield @param axes Array of axis names ['x', 'y', ...] @return bitfield containing a representation of the axes map
(axis)
| 81 | |
| 82 | |
| 83 | def encode_axis(axis): |
| 84 | """ |
| 85 | Encode an array of axes names into an axis bitfield |
| 86 | @param axes Array of axis names ['x', 'y', ...] |
| 87 | @return bitfield containing a representation of the axes map |
| 88 | """ |
| 89 | axes_map = { |
| 90 | 'x': 0x01, |
| 91 | 'y': 0x02, |
| 92 | 'z': 0x03, |
| 93 | 'a': 0x04, |
| 94 | 'b': 0x05, |
| 95 | } |
| 96 | |
| 97 | return axes_map[axis.lower()] |
| 98 | |
| 99 | |
| 100 | def encode_axes(axes): |
nothing calls this directly
no outgoing calls
no test coverage detected