[Numpy-svn] [numpy/numpy] 5c8d5c: MAINT: adept divisions for truedivide

GitHub noreply@github....
Sun Jun 9 10:11:05 CDT 2013


  Branch: refs/heads/master
  Home:   https://github.com/numpy/numpy
  Commit: 5c8d5c263b93700ae92aff38bb9a8d05c0a185e6
      https://github.com/numpy/numpy/commit/5c8d5c263b93700ae92aff38bb9a8d05c0a185e6
  Author: Sebastian Berg <sebastian@sipsolutions.net>
  Date:   2013-05-31 (Fri, 31 May 2013)

  Changed paths:
    M numpy/core/defchararray.py
    M numpy/lib/index_tricks.py
    M numpy/lib/shape_base.py
    M numpy/random/tests/test_regression.py

  Log Message:
  -----------
  MAINT: adept divisions for truedivide

Following deprecations would cause problems otherwise.


  Commit: 8dfc25d0e1fcaed67b8c688cfd9f5ac0641fc5e7
      https://github.com/numpy/numpy/commit/8dfc25d0e1fcaed67b8c688cfd9f5ac0641fc5e7
  Author: Sebastian Berg <sebastian@sipsolutions.net>
  Date:   2013-05-31 (Fri, 31 May 2013)

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

  Log Message:
  -----------
  API: Deprecating the use of non-integers for indices arguments

This changes the conversion utils to give deprecations for a all
non-integers (this currently includes python bools). The biggest
change is PyArray_PyIntAsIntp in which the deprecation is done.
Some other conversions are then also pointed to it.

Uses the Index machinery even for numpy types, which is faster
then the current code.


  Commit: a727f424a5b402558a7b7cba978449a1b015a47e
      https://github.com/numpy/numpy/commit/a727f424a5b402558a7b7cba978449a1b015a47e
  Author: Sebastian Berg <sebastian@sipsolutions.net>
  Date:   2013-05-31 (Fri, 31 May 2013)

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

  Log Message:
  -----------
  API: Deprecate __index__ for ndim > 0

For example NumPy indexing treats np.ones(()) very differently from
np.ones((1,)). It seems a bad idea to allow __index__ for arrays that
are not 0-d, as they cannot always be safely interpreted as integers.


  Commit: 482142c42e186237525855464d141e2e5eef5808
      https://github.com/numpy/numpy/commit/482142c42e186237525855464d141e2e5eef5808
  Author: Sebastian Berg <sebastian@sipsolutions.net>
  Date:   2013-05-31 (Fri, 31 May 2013)

  Changed paths:
    M numpy/core/src/multiarray/iterators.c
    M numpy/core/src/multiarray/mapping.c
    M numpy/core/src/private/npy_pycompat.h

  Log Message:
  -----------
  MAINT: Remove non-integer deprecations which are now in PyIntAsIntp

Also removed old (commented) macro, the use of PyNumber_Index is
now actually implemented in PyIntAsIntp and not necessary here.

Removes PyIndex_Check compatibility macros, since we do not support
python < 2.5 anymore.

Change integer conversion error to IndexError, previously these
fell through and eventually became an IndexError.


  Commit: 399e55bd41081555e4fc93d567a478fc576cdd00
      https://github.com/numpy/numpy/commit/399e55bd41081555e4fc93d567a478fc576cdd00
  Author: Sebastian Berg <sebastian@sipsolutions.net>
  Date:   2013-05-31 (Fri, 31 May 2013)

  Changed paths:
    M numpy/core/tests/test_deprecations.py
    M numpy/core/tests/test_indexing.py

  Log Message:
  -----------
  TST: Rework test_deprecations.py and add new tests.


  Commit: c51f2549e824f4e8bcee550d993fe6a1ced9cacb
      https://github.com/numpy/numpy/commit/c51f2549e824f4e8bcee550d993fe6a1ced9cacb
  Author: Sebastian Berg <sebastian@sipsolutions.net>
  Date:   2013-05-31 (Fri, 31 May 2013)

  Changed paths:
    M numpy/core/src/multiarray/conversion_utils.c
    M numpy/core/src/multiarray/number.c

  Log Message:
  -----------
  STY: style and small doc fixes for integer deprecations


  Commit: 3a340b0db0e5629543efabdfacd54abf9f4148e7
      https://github.com/numpy/numpy/commit/3a340b0db0e5629543efabdfacd54abf9f4148e7
  Author: Sebastian Berg <sebastian@sipsolutions.net>
  Date:   2013-05-31 (Fri, 31 May 2013)

  Changed paths:
    M numpy/core/src/multiarray/conversion_utils.c
    M numpy/core/src/multiarray/conversion_utils.h

  Log Message:
  -----------
  MAINT: Create new function PyArray_IntpFromIndexSequence

This function uses npy_intp to in principle support larger then
int sequence lengths.


  Commit: 187f128563da83b8f202264658dc4dfa80899e93
      https://github.com/numpy/numpy/commit/187f128563da83b8f202264658dc4dfa80899e93
  Author: Sebastian Berg <sebastian@sipsolutions.net>
  Date:   2013-06-09 (Sun, 09 Jun 2013)

  Changed paths:
    M doc/release/1.8.0-notes.rst
    M numpy/core/tests/test_deprecations.py

  Log Message:
  -----------
  DOC: Add integer deprecations to release notes

(also minor spelling fix in comments)


  Commit: 0e9dccd0b8375a487b435411eb58f00d5d4a8bdc
      https://github.com/numpy/numpy/commit/0e9dccd0b8375a487b435411eb58f00d5d4a8bdc
  Author: Sebastian Berg <sebastian@sipsolutions.net>
  Date:   2013-06-09 (Sun, 09 Jun 2013)

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

  Log Message:
  -----------
  MAINT: Use warnings context manager instead of doing it by hand


  Commit: a6a2c601c28687e8ff8b44f5319280b20a9c3f71
      https://github.com/numpy/numpy/commit/a6a2c601c28687e8ff8b44f5319280b20a9c3f71
  Author: Sebastian Berg <sebastian@sipsolutions.net>
  Date:   2013-06-09 (Sun, 09 Jun 2013)

  Changed paths:
    M numpy/core/src/multiarray/conversion_utils.c
    M numpy/core/tests/test_deprecations.py
    M numpy/lib/shape_base.py
    M numpy/random/tests/test_regression.py

  Log Message:
  -----------
  STY: Style fixes for integer deprecation changes

Also minor changes in the documentation.


  Commit: e67269a5c14954e03d8afaa30a5fe4299f2fd062
      https://github.com/numpy/numpy/commit/e67269a5c14954e03d8afaa30a5fe4299f2fd062
  Author: Sebastian Berg <sebastian@sipsolutions.net>
  Date:   2013-06-09 (Sun, 09 Jun 2013)

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

  Log Message:
  -----------
  MAINT: Minor style fix and integer conversion optimizations


  Commit: 163f6df5a6668d06cb7abfe38dbd03d19b26d6f3
      https://github.com/numpy/numpy/commit/163f6df5a6668d06cb7abfe38dbd03d19b26d6f3
  Author: Sebastian Berg <sebastian@sipsolutions.net>
  Date:   2013-06-09 (Sun, 09 Jun 2013)

  Changed paths:
    M numpy/core/src/multiarray/conversion_utils.c
    M numpy/core/tests/test_deprecations.py

  Log Message:
  -----------
  MAINT: Disallow np.bool_ being used as integer

This makes the deprecation of bools used as integers complete
from the numpy perspective. It would not be unsensible to move
the bool checks into indexing specific code though.


  Commit: 558cd20c29db0cd89c4d92fc354602650f861064
      https://github.com/numpy/numpy/commit/558cd20c29db0cd89c4d92fc354602650f861064
  Author: Charles Harris <charlesr.harris@gmail.com>
  Date:   2013-06-09 (Sun, 09 Jun 2013)

  Changed paths:
    M doc/release/1.8.0-notes.rst
    M numpy/core/defchararray.py
    M numpy/core/src/multiarray/conversion_utils.c
    M numpy/core/src/multiarray/conversion_utils.h
    M numpy/core/src/multiarray/iterators.c
    M numpy/core/src/multiarray/mapping.c
    M numpy/core/src/multiarray/number.c
    M numpy/core/src/private/npy_pycompat.h
    M numpy/core/tests/test_deprecations.py
    M numpy/core/tests/test_indexing.py
    M numpy/lib/index_tricks.py
    M numpy/lib/shape_base.py
    M numpy/random/tests/test_regression.py

  Log Message:
  -----------
  Merge pull request #3243 from seberg/deprecate-non-integer-arguments-new

Deprecate non integer arguments


Compare: https://github.com/numpy/numpy/compare/704b456e49b1...558cd20c29db


More information about the Numpy-svn mailing list