8a3c5668c2cbac8d6fefbd44a70641dd2bf23334,tests/multi_objective/hypervolume_tests/test_wfg.py,,test_wfg_nd,#,34
Before Change
def test_wfg_nd() -> None:
for n in range(2, 20):
r = 2 * np.ones(n)
s = np.asarray([np.hstack((np.zeros(i), [1], np.zeros(n - i - 1))) for i in range(n)])
v = optuna.multi_objective.hypervolume.WFG().compute(s, r)
print(r, "\n", s)
assert v == 2 ** n - 1
After Change
for n in range(2, 10):
r = 2 * np.ones(n)
s = [np.hstack((np.zeros(i), [1], np.zeros(n - i - 1))) for i in range(n)]
for _ in range(10):
s.append(np.random.randint(1, 2, size=(n,)))
s = np.asarray(s)
v = optuna.multi_objective.hypervolume.WFG().compute(s, r)
assert v == 2 ** n - 1
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances Project Name: pfnet/optuna
Commit Name: 8a3c5668c2cbac8d6fefbd44a70641dd2bf23334
Time: 2020-07-20
Author: imamura@ms.k.u-tokyo.ac.jp
File Name: tests/multi_objective/hypervolume_tests/test_wfg.py
Class Name:
Method Name: test_wfg_nd
Project Name: chris-chris/pysc2-examples
Commit Name: 9ddf959bb26d5d15d4a0c9ddd6821a262866214c
Time: 2017-11-03
Author: sjhshy@gmail.com
File Name: a2c/a2c.py
Class Name: Runner
Method Name: update_obs
Project Name: Qiskit/qiskit-aqua
Commit Name: 0dfe27c952b9c6f76425394f166a7058e86d3218
Time: 2019-07-16
Author: chenrich@us.ibm.com
File Name: qiskit/aqua/operators/common.py
Class Name:
Method Name: measure_pauli_z