numpy 1.3 compat: use explicit type definitions
numpy 1.3 compat: make neighbors/dist_metrics compatible