OPT: Speed improvements by avoiding repeated calls to check_array
Merge pull request #3811 from MechCoder/fix_repeated_checking

[MRG] Fix repeated calls of check_pairwise and type casting in pairwise_distances_argmin_min