Yabin Li
2023-08-17 7a02f6d5c5a6912615cd6d2fbc3359c76cdfe8a3
funasr/utils/misc.py
@@ -12,7 +12,7 @@
    return numel
def int2vec(x, vec_dim=8, dtype=np.int):
def int2vec(x, vec_dim=8, dtype=np.int32):
    b = ('{:0' + str(vec_dim) + 'b}').format(x)
    # little-endian order: lower bit first
    return (np.array(list(b)[::-1]) == '1').astype(dtype)