SyntaxFix
Write A Post
Hire A Developer
Questions
You can use x.astype('uint8') where x is your Boolean array.
x.astype('uint8')
x