ported to NPY_1_7_API