ENH: enhance meshgrid to generate 3D grids, sparse grids, matrix indexing.
MAINT: clean up docstring and some minor items in meshgrid.  Remove ndgrid.
BUG: meshgrid: raise error on single input.
TST: meshgrid: test expected shapes for Cartesian and matrix indexing.
STY: meshgrid: some minor changes to address review comments.
Stress that all array creation C functions steals a reference to descr.
BUG: maskna: PEP3118 code wasn't raising an error on NA-masked arrays
Consolidate all array writeability checking in new PyArray_RequireWriteable

This is mostly a code cleanup, but it does have a user-visible effect
in that attempting to write to a unwriteable array now consistently
raises ValueError. (It used to randomly raise either ValueError or
RuntimeError.)

Passes numpy.test("full").
Funnel all assignments to PyArrayObject->base through a single point

This patch removes all direct assignments of non-NULL values to the
'base' field on PyArrayObjects. A new utility function was created to
set up UPDATEIFCOPY arrays, and all assignments to 'base' were
adjusted to use either PyArray_SetBaseObject or the new
PyArray_SetUpdateIfCopyBase.

One advantage of this is that it produces more consistent error
handling. This error handling revealed a bug in the nditer code,
which this patch does *not* yet fix.

The bug is that npyiter_new_temp_array sometimes (when dealing with
reversed axes) creates an array and then returns a view onto it. But,
npyiter_allocate_arrays assumes that the array returned by
npyiter_new_temp_array can have UPDATEIFCOPY set, which requires
reassigning its 'base' field. Previously, this meant that the
temporary array leaked. Now, it produces a ValueError.

This code path doesn't seem to actually be hit very often; only one of
the nditer tests fails because of the change. See
   numpy/core/tests/test_nditer.py:test_iter_array_cast_buggy
Add a test for ndarray.diagonal()

All 'expected' values were computed using numpy 1.5.1, so we can be
pretty sure that the recent rewrite didn't change any results.
Transition scheme for allowing PyArray_Diagonal to return a view

PyArray_Diagonal is changed to return a copy of the diagonal (as in
numpy 1.6 and earlier), but with a new (hidden) WARN_ON_WRITE flag
set. Writes to this array (or views thereof) will continue to work as
normal, but the first write will trigger a DeprecationWarning.

We also issue this warning if someone extracts a non-numpy writeable
view of the array (e.g., by accessing the Python-level .data
attribute). There are likely still places where the data buffer is
exposed that I've missed -- review welcome!

New known-fail test: eye() for maskna arrays was only implemented by
exploiting ndarray.diagonal's view-ness, so it is now unimplemented
again, and the corresponding test is marked known-fail.
Document the PyArray_Diagonal transition scheme.
Typo fix

Thanks to Travis for catching it.
BUG: fix typo in bscript.
ENH: use custom_python instead of built-in waf tool.
BUG: nditer: Memory leak from setting 'base' attribute two ways

Numpy uses its 'base' attribute in two different ways, both
to manage the memory of an external data buffer, and to track
an array for 'UPDATEIFCOPY' purposes. The nditer was creating
a temporary view with negative strides to match the strides of
input arrays, but then also wanted to use UPDATEIFCOPY. Unfortunately
this choice to overload 'base' for both purposes prevents that
from working, and the result was a memory leak.

This bug has been fixed by choosing instead to retain positive
strides and not fully match the order of input memory when
doing the UPDATEIFCOPY.
Merge pull request #278 from mwiebe/NA_buffer_errorcheck

BUG: maskna: PEP3118 code wasn't raising an error on NA-masked arrays
Merge pull request #268 from FrancescAlted/master

The docs should stress that functions that create arrays actually steals a reference to dtype descriptor
TST: ticket #1878, test argmin with minimum signed integers.

The bug in ticket #1878 has been fixed in 1.7 but it still needs a test.
Thanks to tlatorre.
TST: Fix memoryview 2.6/2.7 compatibiliy in maskna pep3118 test