fast_cdist should fail on wrong input dimension.