BUG: ticket #2063, make unique return consistent index.

Make unique use  mergesort when return_index is true. This quarantees that
the returned indices are of the first occurrence of the unique elements and
makes the behavior better defined and consistent.
BUG: ticket #1149, make argmin work for datetime.

Backport of 6fc0737 'ENH: Explicitly coded argmin for timedelta'
BUG: Fix maximum/minimum for object arrays in Python 3.

Use PyObject_RichCompareBool instead of PyObject_Cmp.
BUG: ticket #1138

This is a backport of 4daf949

PyArray_FromBuffer: Allow creating arrays from empty buffers
or empty slices.

That finally closed the ticket.
DOC: ticket #1446, correct note about correspondence vstack and
concatenate.
BUG: Ticket #1672 fix allclose to work for scalar inf.

Backport of 7497d60.

Also actually runs tests. Tests were not run before because the allclose
test class was a subclass of TestCase and used generators. This is not
supported by nose, tests will be skipped.

Also changes plain asserts to assert_().

Thanks to Justin Peel for the allclose inf fix.
ENH: ticket #1675, Add scalar support for the format() function.

Backport of 88e8c15.
BUG: ticket #1747, make np.median() work for 0-D arrays.
BUG: ticket #1776, make complex division by zero to yield inf properly.
BUG: ticket #1905, explicitly check for NaNs in allclose().

Also clean up the logic behind handling infs.
Squashed backport of 3503c5f..aea76b8.
BUG: ticket #1948, fix regression for indexing chararrays with empty list.
BUG: array_divmod did not check for Py_NotImplemented.

The consequence of this bug was the __rdivmod__ wasn't called for user
classes that defined __array_priority__.
BUG: ticket #2017, fix type hash.

This is a squashed backport of 4 commits.
STY: cleanup hashdesc.c to follow our C conventions.

BUG: fix inconsistencies in dtype flag type at the C level.

Conflicts:

	numpy/core/src/multiarray/descriptor.c
	numpy/core/src/multiarray/hashdescr.c

BUG: fix #2017 by ignoring type_num in the hash input.

Since type_num is not considered in PyArray_EquivTypes (for dtype
equality comparison), seems reasonable to ignore it for hashing as
well.

Conflicts:

	numpy/core/tests/test_dtype.py

BUG: fix flags type when exposed to python.
BUG: ticket #1952, allow floating ddof in std and var.

Also return nan for resulting non-positive degrees of freedom.
BUG: ticket #2033, a**2.0 has incorrect type.

Backport of PR #207.
BUG: ticket #2046, deleting array attributes causes segfault.

Add check for NULL in setter functions and return Attribute error
if found.
BUG: ticket #2045, make attribute/iterator_element deletions not segfault.

Attempted attribute deletion raises an Attribute error. Deleting
an iterator index or slice raises a TypeError. This is a change for
nditer, which used to raise ValueError when deletes were attempted.
TST: Silence some test warnings.
PY3: Fix for python3.2.
BUG: ticket #2021. Fix segfault.

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.