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

GitHub noreply@github....
Wed Sep 25 17:41:12 CDT 2013


  Branch: refs/heads/master
  Home:   https://github.com/numpy/numpy
  Commit: ed7e9ab53a43188268cd8ddd7e8eb125fb32e495
      https://github.com/numpy/numpy/commit/ed7e9ab53a43188268cd8ddd7e8eb125fb32e495
  Author: Sebastian Berg <sebastian@sipsolutions.net>
  Date:   2013-09-23 (Mon, 23 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: 79a1e7a9c2ded59a632329dbdfbc4783300e0142
      https://github.com/numpy/numpy/commit/79a1e7a9c2ded59a632329dbdfbc4783300e0142
  Author: Charles Harris <charlesr.harris@gmail.com>
  Date:   2013-09-25 (Wed, 25 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 #3788 from seberg/object-copy-refs

BUG: INCREF before DECREF when copying object arrays.


Compare: https://github.com/numpy/numpy/compare/bab8e8c622c6...79a1e7a9c2de


More information about the Numpy-svn mailing list