avoiding einsum because it depends on numpy 1.6+
avoiding einsum because it depends on numpy 1.6+

also, it's potentially more opaque to read

all-umass/metric-learn,JingheZ/metric-learn,tigerneil/metric-learn,Snazz2001/metric-learn,xuanhan863/metric-learn,terrytangyuan/metric-learn