Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test break after 28a16ce #61

Closed
briling opened this issue Jun 14, 2024 · 3 comments
Closed

test break after 28a16ce #61

briling opened this issue Jun 14, 2024 · 3 comments

Comments

@briling
Copy link
Contributor

briling commented Jun 14, 2024

I've installed with pip install qstack[all] git+https://github.com/lcmd-epfl/Q-stack into a fresh python 3.9 environment and test_global.py fails

>>> numpy.__version__
'1.26.4'

The "old" version is '1.21.2'

@briling
Copy link
Contributor Author

briling commented Jun 14, 2024

(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()

@briling
Copy link
Contributor Author

briling commented Jun 14, 2024

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

@YAY-C
Copy link
Contributor

YAY-C commented Jun 14, 2024

closed by #63

@YAY-C YAY-C closed this as completed Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants