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:
[email protected]


Reply via email to