BUG: Closes #5313 PyArray_AsCArray caused segfault