fallback for old numpy versions