Update for py3k, and various bug fixes from <https://github.com/numpy/numpy-dtypes>