use current numpy c api
use current numpy c api
Use the new numpy c api that require PyArrayObject as input.
Use the same attribute checking as done in NumPy.