It is quite trivial (X=='y').astype(int). Should do the trick. It simply converts your array to True or False according to your requirements ...
確定! 回上一頁