[Numpy-svn] [numpy/numpy] 486a36: BUG: PyErr_SetObject does not steal reference.

GitHub noreply@github....
Sun Sep 30 23:18:55 CDT 2012


  Branch: refs/heads/maintenance/1.7.x
  Home:   https://github.com/numpy/numpy
  Commit: 486a36fbbc3d0408fca46fd21b2cf8e7184c0751
      https://github.com/numpy/numpy/commit/486a36fbbc3d0408fca46fd21b2cf8e7184c0751
  Author: Sebastian Berg <sebastian@sipsolutions.net>
  Date:   2012-09-30 (Sun, 30 Sep 2012)

  Changed paths:
    M numpy/core/src/multiarray/array_assign.c
    M numpy/core/src/multiarray/array_assign_array.c
    M numpy/core/src/multiarray/array_assign_scalar.c
    M numpy/core/src/multiarray/ctors.c
    M numpy/core/src/multiarray/datetime.c
    M numpy/core/src/multiarray/descriptor.c
    M numpy/core/src/multiarray/methods.c
    M numpy/core/src/multiarray/nditer_constr.c
    M numpy/core/src/umath/ufunc_type_resolution.c

  Log Message:
  -----------
  BUG: PyErr_SetObject does not steal reference.

Closes "Ticket #2125" and "Ticket #2216"


  Commit: 13c7efa8a2d239f021f04965c024147a30a5be3a
      https://github.com/numpy/numpy/commit/13c7efa8a2d239f021f04965c024147a30a5be3a
  Author: Sebastian Berg <sebastian@sipsolutions.net>
  Date:   2012-09-30 (Sun, 30 Sep 2012)

  Changed paths:
    M numpy/core/src/multiarray/shape.c

  Log Message:
  -----------
  Reset flags when Axes are removed. Array might now be 1D, or removed axes of size 1 destroy contiguousity.


  Commit: 4b6aa87d448ac28880bf850916f8fe902ec4675f
      https://github.com/numpy/numpy/commit/4b6aa87d448ac28880bf850916f8fe902ec4675f
  Author: Sebastian Berg <sebastian@sipsolutions.net>
  Date:   2012-09-30 (Sun, 30 Sep 2012)

  Changed paths:
    M numpy/core/tests/test_regression.py

  Log Message:
  -----------
  Tests related to Issue #387


  Commit: d4e25cd0ea45aa1f10386fe3b2d640efc45a4662
      https://github.com/numpy/numpy/commit/d4e25cd0ea45aa1f10386fe3b2d640efc45a4662
  Author: Nathaniel J. Smith <njs@pobox.com>
  Date:   2012-09-30 (Sun, 30 Sep 2012)

  Changed paths:
    M numpy/testing/tests/test_utils.py
    M numpy/testing/utils.py

  Log Message:
  -----------
  ENH: More capable test functions for warnings

1) New function assert_no_warnings
2) Make assert_warns and assert_no_warnings pass through the
   function's return value on success, so that it can be checked as
   well.


  Commit: 2397c9d4908c34de3aff4c834b938f696518418b
      https://github.com/numpy/numpy/commit/2397c9d4908c34de3aff4c834b938f696518418b
  Author: Nathaniel J. Smith <njs@pobox.com>
  Date:   2012-09-30 (Sun, 30 Sep 2012)

  Changed paths:
    M doc/release/1.7.0-notes.rst
    M doc/source/reference/ufuncs.rst
    M numpy/core/code_generators/numpy_api.py
    M numpy/core/include/numpy/ndarraytypes.h
    M numpy/core/src/multiarray/common.c
    M numpy/core/src/multiarray/convert_datatype.c
    M numpy/core/tests/test_ufunc.py

  Log Message:
  -----------
  FIX: Transition scheme for safer in-place ufunc operations

In numpy 1.6 and earlier, if you do
  np.add(int_arr, float_arr, out=int_arr)
or
  int_arr += float_arr
then the result will be silently truncated to integer values. This
often produces bugs, because it's easy to accidentally end up with an
integer array and not realize it.

Therefore, there seems to be consensus that we should switch to using
same_kind casting by default for in-place ufunc operations. However,
just switching this (as was done initially during the 1.7 development
cycle) breaks a lot of code, which is rude and violates our
deprecation policy.

This commit instead adds a special temporary casting rule which acts
like "unsafe", but also checks whether each operation would be allowed
under "same_kind" rules and issues a DeprecationWarning if not.

It also moves NPY_DEFAULT_ASSIGN_CASTING into the formal API instead
of leaving it as a #define. This way we can change it later, and any
code which references it and is compiled against this version of numpy
will automatically switch to whatever we change it too. This avoids
the situation where we want to remove the temporary magic value we're
using to create DeprecationWarnings now, but can't because it would be
an ABI break.


  Commit: 1db458597494980a4c16453d29a26e208d16e8bf
      https://github.com/numpy/numpy/commit/1db458597494980a4c16453d29a26e208d16e8bf
  Author: Nathaniel J. Smith <njs@pobox.com>
  Date:   2012-09-30 (Sun, 30 Sep 2012)

  Changed paths:
    M numpy/core/include/numpy/ndarraytypes.h
    M numpy/core/src/multiarray/common.c
    M numpy/core/src/multiarray/convert_datatype.c
    M numpy/core/tests/test_ufunc.py

  Log Message:
  -----------
  STY: fix up style and a few wordings on previous commit


  Commit: f2e34d61e0dd6690519be9d702d3a2c810e608d9
      https://github.com/numpy/numpy/commit/f2e34d61e0dd6690519be9d702d3a2c810e608d9
  Author: Nathaniel J. Smith <njs@pobox.com>
  Date:   2012-09-30 (Sun, 30 Sep 2012)

  Changed paths:
    M numpy/core/tests/test_ufunc.py

  Log Message:
  -----------
  STY: another wording tweak (thanks to @charris)


  Commit: c11c6edff540b8d8e0bbb953f11c1908aef3137b
      https://github.com/numpy/numpy/commit/c11c6edff540b8d8e0bbb953f11c1908aef3137b
  Author: Matthew Brett <matthew.brett@gmail.com>
  Date:   2012-09-30 (Sun, 30 Sep 2012)

  Changed paths:
    M numpy/core/src/multiarray/multiarraymodule.c
    M numpy/core/tests/test_shape_base.py

  Log Message:
  -----------
  BUG: allow any axis for np.concatenate for 1D

Previous numpies allowed the user to pass any integer as axis argument
to np.concatenate, when the input arrays were 1D.  At some point we
tightened up on this, raising an error for axis values other than 0.
This raises a FutureWarning for axis numbers != 0, but allows them, for
backwards compatibility.

Conflicts:

	numpy/core/tests/test_shape_base.py


  Commit: 91fb6e4f01ffe25671de168ca6d9f6ea19c1a237
      https://github.com/numpy/numpy/commit/91fb6e4f01ffe25671de168ca6d9f6ea19c1a237
  Author: Matthew Brett <matthew.brett@gmail.com>
  Date:   2012-09-30 (Sun, 30 Sep 2012)

  Changed paths:
    M numpy/core/src/multiarray/multiarraymodule.c
    M numpy/core/tests/test_shape_base.py

  Log Message:
  -----------
  BUG: change FutureWarning to DeprecationWarning

Use of PyErr_WarnEx causing failure for Python 2.4.


  Commit: 9ea0f0f0ed07d234645fee0eccd1773d0397301a
      https://github.com/numpy/numpy/commit/9ea0f0f0ed07d234645fee0eccd1773d0397301a
  Author: Matthew Brett <matthew.brett@gmail.com>
  Date:   2012-09-30 (Sun, 30 Sep 2012)

  Changed paths:
    M numpy/core/tests/test_shape_base.py

  Log Message:
  -----------
  TST: test DeprecationWarning raised by concatenate

>From review by Nathaniel - thanks.


  Commit: 86fbf95def074931606344fc405aea705e4f427f
      https://github.com/numpy/numpy/commit/86fbf95def074931606344fc405aea705e4f427f
  Author: Ondřej Čertík <ondrej.certik@gmail.com>
  Date:   2012-09-30 (Sun, 30 Sep 2012)

  Changed paths:
    M doc/release/1.7.0-notes.rst
    M doc/source/reference/ufuncs.rst
    M numpy/core/code_generators/numpy_api.py
    M numpy/core/include/numpy/ndarraytypes.h
    M numpy/core/src/multiarray/array_assign.c
    M numpy/core/src/multiarray/array_assign_array.c
    M numpy/core/src/multiarray/array_assign_scalar.c
    M numpy/core/src/multiarray/common.c
    M numpy/core/src/multiarray/convert_datatype.c
    M numpy/core/src/multiarray/ctors.c
    M numpy/core/src/multiarray/datetime.c
    M numpy/core/src/multiarray/descriptor.c
    M numpy/core/src/multiarray/methods.c
    M numpy/core/src/multiarray/multiarraymodule.c
    M numpy/core/src/multiarray/nditer_constr.c
    M numpy/core/src/multiarray/shape.c
    M numpy/core/src/umath/ufunc_type_resolution.c
    M numpy/core/tests/test_regression.py
    M numpy/core/tests/test_shape_base.py
    M numpy/core/tests/test_ufunc.py
    M numpy/testing/tests/test_utils.py
    M numpy/testing/utils.py

  Log Message:
  -----------
  Merge pull request #472 from certik/1.7.x-backport

1.7.x backport


Compare: https://github.com/numpy/numpy/compare/7ae2fb0160a0...86fbf95def07


More information about the Numpy-svn mailing list