NumPy C-API like interface.