[Numpy-svn] [numpy/numpy] 593345: ENH: Avoid memory peak and useless computations wh...

GitHub noreply at github.com
Tue Dec 1 18:18:32 EST 2015


  Branch: refs/heads/master
  Home:   https://github.com/numpy/numpy
  Commit: 593345a75fdd3de103e3e50969fbca2ed752f08d
      https://github.com/numpy/numpy/commit/593345a75fdd3de103e3e50969fbca2ed752f08d
  Author: Simon Conseil <contact at saimon.org>
  Date:   2015-11-28 (Sat, 28 Nov 2015)

  Changed paths:
    M numpy/ma/core.py

  Log Message:
  -----------
  ENH: Avoid memory peak and useless computations when printing a MaskedArray.

Ref #3544.

When printing a `MaskedArray`, the whole array is converted to the object dtype,
whereas only a few values are printed to screen. So the approach here is to cut
the array and keep only a subset that it used for the string conversion. This
way the output should not change.


  Commit: b5c456e84dc87521a476ff51e3a2ab55f8c5c29f
      https://github.com/numpy/numpy/commit/b5c456e84dc87521a476ff51e3a2ab55f8c5c29f
  Author: Simon Conseil <contact at saimon.org>
  Date:   2015-12-01 (Tue, 01 Dec 2015)

  Changed paths:
    M numpy/ma/core.py

  Log Message:
  -----------
  Allow to change the maximum width with a class variable.


  Commit: d0e9d98b2aa126bb2654c4c5966a4034c4bb99fc
      https://github.com/numpy/numpy/commit/d0e9d98b2aa126bb2654c4c5966a4034c4bb99fc
  Author: Simon Conseil <contact at saimon.org>
  Date:   2015-12-02 (Wed, 02 Dec 2015)

  Changed paths:
    M numpy/ma/core.py

  Log Message:
  -----------
  Use integer division to avoid casting to int.


  Commit: 11f809219458973d73018ad2438cb8514b61c7a6
      https://github.com/numpy/numpy/commit/11f809219458973d73018ad2438cb8514b61c7a6
  Author: Charles Harris <charlesr.harris at gmail.com>
  Date:   2015-12-01 (Tue, 01 Dec 2015)

  Changed paths:
    M numpy/ma/core.py

  Log Message:
  -----------
  Merge pull request #6748 from saimn/ma-repr-memory

ENH: Avoid memory peak and useless computations when printing a MaskedArray.


Compare: https://github.com/numpy/numpy/compare/433e6691113c...11f809219458


More information about the Numpy-svn mailing list