[Numpy-svn] [numpy/numpy] 58cb65: BUG: INCREF before DECREF when copying object arra...

GitHub noreply@github....
Fri Sep 27 18:46:23 CDT 2013


  Branch: refs/heads/maintenance/1.8.x
  Home:   https://github.com/numpy/numpy
  Commit: 58cb65f4317ce58fb5c352d3833b46f5c8324065
      https://github.com/numpy/numpy/commit/58cb65f4317ce58fb5c352d3833b46f5c8324065
  Author: Sebastian Berg <sebastian@sipsolutions.net>
  Date:   2013-09-27 (Fri, 27 Sep 2013)

  Changed paths:
    M numpy/core/src/multiarray/arraytypes.c.src
    M numpy/core/src/multiarray/dtype_transfer.c
    M numpy/core/tests/test_regression.py

  Log Message:
  -----------
  BUG: INCREF before DECREF when copying object arrays.

Only the change in dtype_transfer actually seems to be
related to the simple np.copyto(a, a) bug, when a is a scalar
object array.
It seemed however safer to me, to generally turn around the
logic, even if it may not be necessary and in one place
requires an extra temporary variable.

Closes gh-3787


  Commit: 3aa264fb13fb4e8698db32d6a1bb520460fc5126
      https://github.com/numpy/numpy/commit/3aa264fb13fb4e8698db32d6a1bb520460fc5126
  Author: Charles Harris <charlesr.harris@gmail.com>
  Date:   2013-09-27 (Fri, 27 Sep 2013)

  Changed paths:
    M numpy/core/src/multiarray/arraytypes.c.src
    M numpy/core/src/multiarray/dtype_transfer.c
    M numpy/core/tests/test_regression.py

  Log Message:
  -----------
  Merge pull request #3810 from charris/backport-1.8-3788

Backport 1.8 3788


Compare: https://github.com/numpy/numpy/compare/ec95b0ae495b...3aa264fb13fb


More information about the Numpy-svn mailing list