Commit f791949
committed
fix gh-2121
underlying memory of a boolean array may not be 0 and 1 when a boolean view is made from a non-boolean array, leading to unexpected results when copying element-wise, especially in astype
use a special path for boolean inputs to astype to make sure output is 0 and 11 parent 6f6fe50 commit f791949
1 file changed
+3
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
739 | 739 | | |
740 | 740 | | |
741 | 741 | | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
742 | 745 | | |
743 | 746 | | |
744 | 747 | | |
| |||
0 commit comments