replace deprecated PyArray_ContiguousFromObject with PyArray_ContiguousFromAny