fix for older numpy versions