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 2020/08/26 01:16:13 UTC

[GitHub] [incubator-mxnet] Zha0q1 opened a new issue #19014: Cannot modify last element of large tensors

Zha0q1 opened a new issue #19014:
URL: https://github.com/apache/incubator-mxnet/issues/19014


   It looks like for some reason the last element of a large tensor cannot be modified:
   ```python
   INT_OVERFLOW = 2**31-1
   A = np.zeros((2, INT_OVERFLOW))
   A[1, -1] = 1
   print(A)
   ```
   gives
   ```
   [[0. 0. 0. ... 0. 0. 0.]
    [0. 0. 0. ... 0. 0. 1.]]
   ```
   However,
   ```python
   INT_OVERFLOW = 2**31
   A = np.zeros((2, INT_OVERFLOW))
   A[1, -1] = 1
   print(A)
   ```
   gives
   ```
   [[0. 0. 0. ... 0. 0. 0.]
    [0. 0. 0. ... 0. 0. 0.]]
   ```
   Even this don't work:
   ```
   INT_OVERFLOW = 2**31
   A = np.zeros((2, INT_OVERFLOW))
   A[1, INT_OVERFLOW-2] = 1
   print(A)
   ```
   ```
   [[0. 0. 0. ... 0. 0. 0.]
    [0. 0. 0. ... 0. 0. 0.]]
   ```
   This is fine tho:
   ```
   INT_OVERFLOW = 2**31
   A = np.zeros((2, INT_OVERFLOW))
   A[1, INT_OVERFLOW-2] = 1
   print(A)
   ```
   ```
   [[0. 0. 0. ... 0. 0. 0.]
    [0. 0. 0. ... 0. 1. 0.]]
   ```
   
   I will probably work on a fix by this week


----------------------------------------------------------------
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



[GitHub] [incubator-mxnet] sxjscience closed issue #19014: Cannot modify elements in large tensors where index > int_max

Posted by GitBox <gi...@apache.org>.
sxjscience closed issue #19014:
URL: https://github.com/apache/incubator-mxnet/issues/19014


   


----------------------------------------------------------------
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



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org