>>> print(re.sub(r"(\d)(\W)", r"\1,\2", s))
np.array([[0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1,],
[1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1,
0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0,],
[0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0,
0, 1, 0, 1, 0, 0, 0,]])