def test_batch_eval_neg_aug_hartmann6(self, cuda=False):
     device = torch.device("cuda") if cuda else torch.device("cpu")
     for dtype in (torch.float, torch.double):
         X = torch.zeros(2, 7, device=device, dtype=dtype)
         res = neg_aug_hartmann6(X)
         self.assertEqual(res.dtype, dtype)
         self.assertEqual(res.device.type, device.type)
         self.assertEqual(res.shape, torch.Size([2]))
 def test_neg_aug_hartmann6_global_maximum(self, cuda=False):
     device = torch.device("scuda") if cuda else torch.device("cpu")
     for dtype in (torch.float, torch.double):
         X = torch.tensor(GLOBAL_MAXIMIZER, device=device, dtype=dtype)
         res = neg_aug_hartmann6(X)
         self.assertAlmostEqual(res.item(), GLOBAL_MAXIMUM, places=4)