Commit ab11636f authored by ashivani's avatar ashivani
Browse files

Small error in trans_int_to_binstr

parent affaa8c4
Pipeline #1995 failed with stages
in 9 minutes and 10 seconds
......@@ -63,11 +63,11 @@
%% Cell type:code id: tags:
``` python
# turn a transition into a string of binary
def trans_int_to_binstr(intTrans):
sbinTrans = format(iTrans, "#018b")[2:]
sbinTrans = format(intTrans, "#018b")[2:]
return "_".join(["NESW"[i] + sbinTrans[i*4:(i*4 + 4)] for i in range(0, 4)])
# Turn a transition into a 4x4 array of 0s and 1s
def trans_int_to_4x4(intTrans):
arrBytes = np.array([intTrans >> 8, intTrans & 0xff], dtype=np.uint8)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment