[Numpy-svn] [numpy/numpy] 2c3ef4: BUG: genfromtxt gave OverflorError for large integ...

GitHub noreply at github.com
Fri Mar 6 15:34:43 EST 2015


  Branch: refs/heads/master
  Home:   https://github.com/numpy/numpy
  Commit: 2c3ef4cbe8af6fddd82d7e90433f92b23cbcdd37
      https://github.com/numpy/numpy/commit/2c3ef4cbe8af6fddd82d7e90433f92b23cbcdd37
  Author: Thomas Robitaille <thomas.robitaille at gmail.com>
  Date:   2015-03-06 (Fri, 06 Mar 2015)

  Changed paths:
    M doc/release/1.10.0-notes.rst
    M numpy/lib/_iotools.py
    M numpy/lib/tests/test__iotools.py
    M numpy/lib/tests/test_io.py

  Log Message:
  -----------
  BUG: genfromtxt gave OverflorError for large integers

Fix StringConverter to avoid OverflowError in genfromtxt. Before, int(2**66) would work
(and return a ‘long’) but then np.array([2**66], dtype=np.integer) would not work and
return an OverflowError which would propagate to genfromtxt. This commit fixes this by
ensuring testing in advance whether an OverflowError will occur. In addition, this adds
an explicit np.int64 entry on systems where integer means int32. Values larger than
2**63-1 will be cast as float. This includes a regression test and adds an entry to the
release notes.


  Commit: 7ad33a22736ed12a41251be6aa6a6f413143a8c3
      https://github.com/numpy/numpy/commit/7ad33a22736ed12a41251be6aa6a6f413143a8c3
  Author: Jaime <jaime.frio at gmail.com>
  Date:   2015-03-06 (Fri, 06 Mar 2015)

  Changed paths:
    M doc/release/1.10.0-notes.rst
    M numpy/lib/_iotools.py
    M numpy/lib/tests/test__iotools.py
    M numpy/lib/tests/test_io.py

  Log Message:
  -----------
  Merge pull request #5635 from astrofrog/genfromtxt-largeints

genfromtxt does not work in some cases on 32-bit systems with dtype=None


Compare: https://github.com/numpy/numpy/compare/4cba5310c7b8...7ad33a22736e


More information about the Numpy-svn mailing list