def testArgMaxRnd(self): temp = np.array([np.nan, 1, 2.3, 37, 37, 37, 1]) self.assertEqual(argmaxrnd(temp, hash_dist(np.array([3, 4]))), 5) self.assertRaises(ValueError, argmaxrnd, np.ones((1, 1, 1)))