[Numpy-svn] [numpy/numpy] d36e07: BUG: Fix ticket #2021.

GitHub noreply@github....
Sat Jan 21 11:29:08 CST 2012

  Branch: refs/heads/master
  Home:   https://github.com/numpy/numpy
  Commit: d36e076f0559157745c8cc0186a8484081e55a1d
  Author: Charles Harris <charlesr.harris@gmail.com>
  Date:   2012-01-21 (Sat, 21 Jan 2012)

  Changed paths:
    M numpy/core/src/multiarray/convert_datatype.c
  M numpy/core/src/multiarray/ctors.c
  M numpy/core/src/multiarray/item_selection.c
  M numpy/core/tests/test_regression.py

  Log Message:
  BUG: Fix ticket #2021.

The return from PyArray_DescrFromObject PyArray_SearchSorted needed
to be checked for NULL. Also added checks in other spots where
PyArray_DescrFromObject was called. Added regression test for same.
Made a few small code cleanups along the way.

All the checks may not be necessary, but
1) No one should have to waste brain cycles figuring that out.
2) Bugs happen.
3) Things change.

More information about the Numpy-svn mailing list