[Numpy-svn] [numpy/numpy] 8f172d: BUG: Make type_tuple_type_resolver more robust.

GitHub noreply at github.com
Sat Jun 13 07:05:36 EDT 2015


  Branch: refs/heads/master
  Home:   https://github.com/numpy/numpy
  Commit: 8f172ddbb90357e80bafa2cd7df4b307ce15600b
      https://github.com/numpy/numpy/commit/8f172ddbb90357e80bafa2cd7df4b307ce15600b
  Author: Charles Harris <charlesr.harris at gmail.com>
  Date:   2015-06-12 (Fri, 12 Jun 2015)

  Changed paths:
    M numpy/core/src/umath/ufunc_type_resolution.c

  Log Message:
  -----------
  BUG: Make type_tuple_type_resolver more robust.

When a loop match fails on account of casting, continue searching the
loops until success or all loops have been examined. The failure to do
this was causing true_divide to fail with float inputs and dtype=float
because the first loop found was (int8, int8, float64), leading to a
casting error as float cannot be safely cast to int8. Versions of numpy
previous to 1.10 will still fail silently if this is backported as the
casting rules were less strict, so that would also need fixing.

Closes #3484.


  Commit: f60c553e6c92447d71fc960faf81bdeb9c54bbd6
      https://github.com/numpy/numpy/commit/f60c553e6c92447d71fc960faf81bdeb9c54bbd6
  Author: Charles Harris <charlesr.harris at gmail.com>
  Date:   2015-06-12 (Fri, 12 Jun 2015)

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

  Log Message:
  -----------
  TST: Test that true_divide works for float inputs and dtype=np.float.

This was failing due to the check for matching loops not searching
through all available loops, rather ending with int8 inputs and float
output, which in turn would fail casting.


  Commit: 88937f8f1d61d889e6923de7e15b63e40fa9a8ee
      https://github.com/numpy/numpy/commit/88937f8f1d61d889e6923de7e15b63e40fa9a8ee
  Author: seberg <sebastian at sipsolutions.net>
  Date:   2015-06-13 (Sat, 13 Jun 2015)

  Changed paths:
    M numpy/core/src/umath/ufunc_type_resolution.c
    M numpy/core/tests/test_ufunc.py

  Log Message:
  -----------
  Merge pull request #5963 from charris/rubustify-tuple-loop-search

Rubustify tuple loop search


Compare: https://github.com/numpy/numpy/compare/1fe98ff582d5...88937f8f1d61


More information about the Numpy-svn mailing list