You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2019/10/17 03:03:10 UTC

[GitHub] [incubator-mxnet] tuanzhangCS commented on issue #16110: ndarray treated uint8 as signed value

tuanzhangCS commented on issue #16110: ndarray treated uint8 as signed value
URL: https://github.com/apache/incubator-mxnet/issues/16110#issuecomment-542976704
 
 
   Hi @dwSun , I think maybe it's not a bug.
   Because the type of arr2 is uint8, and the data type of arr2.sum() is also uint8. So, the real sum, which is 11090, is overflow. 11090 % 256 = 82. Then the mean equal to 82 / 100 = 0.
   So, the main reason is `mx.nd.array.sum()` and `np.array.sum()` return different data type. It's seem to `mean()`.
   Do you agree it?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services