Skip to content
This repository was archived by the owner on Nov 17, 2023. It is now read-only.
This repository was archived by the owner on Nov 17, 2023. It is now read-only.

some big numbers can not be assigned correctly with ndarray, it is a big bug??? #11639

@starimpact

Description

@starimpact

code:

  1 import sys
  2 sys.path.insert(0, '/home/mingzhang/work/dmlc/mxnet_v0.8.0.python')
  3
  4 import mxnet as mx
  5 import numpy as np
  6
  7 a = mx.nd.zeros((4, 1), dtype=np.int32)
  8 a[1,0] = int(16800001)
  9 a[2,0] = int(16800002)
 10 b = a.asnumpy()
 11 print b.T, b.dtype
 12 c = a-1
 13 b = c.asnumpy()
 14 print b.T, b.dtype

output:

[[       0 16800000 16800002        0]] int32
[[      -1 16799999 16800001       -1]] int32

16800001 can not be assigned correctly!
the problem is also in mxnet v1.0 and v1.2

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions