Could you replace the numpy arrays with the memeryview syntax?