Alicia1529 opened a new pull request #17668: fix full and full_like when input is boolean URL: https://github.com/apache/incubator-mxnet/pull/17668 ## Description ## 1. enable `np.full` to accept Boolean values as `fill_value` ```python >>> from mxnet import np >>> np.full((3,3), True) array([[ True, True, True], [ True, True, True], [ True, True, True]]) >>> np.full((3,3), False, dtype=np.int32) array([[0, 0, 0], [0, 0, 0], [0, 0, 0]], dtype=int32) ``` 2. enable `np.full_like` to accept 'np.bool' as dtype and boolean values as 'fill_value' ```python >>> a = np.arange(9).reshape(3,3) >>> np.full_like(a, 1, dtype=np.bool) array([[ True, True, True], [ True, True, True], [ True, True, True]]) >>> np.full_like(a, False) array([[0., 0., 0.], [0., 0., 0.], [0., 0., 0.]]) ```
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
