BUG: Closes #5313 PyArray_AsCArray caused segfault
Merge pull request #5314 from hensing/master

BUG: Closes #5313: PyArray_AsCArray caused segfault with 3D-arrays