Closed briling closed 3 weeks ago
(qstack-test) > python test_global.py
{'H': 2, 'O': 1} 3
Computing global kernel elements:
[Traceback (most recent call last):
File "/home/xe/GIT/Q-stack/tests/test_global.py", line 38, in <module>
test_avg_kernel()
File "/home/xe/GIT/Q-stack/tests/test_global.py", line 11, in test_avg_kernel
K = kernel.kernel(mols, akernel='L', gkernel='avg', sigma=1.0)
File "/home/xe/SOFT/miniconda3/envs/qstack-test/lib/python3.9/site-packages/qstack/regression/kernel.py", line 24, in kernel
K = kernel(X, Y, 1.0/sigma)
File "/home/xe/SOFT/miniconda3/envs/qstack-test/lib/python3.9/site-packages/qstack/regression/kernel_utils.py", line 288, in <lambda>
return lambda x, y, s: get_global_K(x, y, s, local_kernel, global_kernel, options)
File "/home/xe/SOFT/miniconda3/envs/qstack-test/lib/python3.9/site-packages/qstack/regression/kernel_utils.py", line 168, in get_global_K
if X[0] == Y[0]:
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
we can either change X[0] == Y[0]
to np.all(X==Y)
(also because X[0] == Y[0]
does not mean that X is Y) or change the arguments to X, Y=None
closed by #63
I've installed with
pip install qstack[all] git+https://github.com/lcmd-epfl/Q-stack
into a fresh python 3.9 environment andtest_global.py
failsThe "old" version is
'1.21.2'