avoid segfault in numpy multiarray