lcmd-epfl / Q-stack

Stack of codes for dedicated pre- and post-processing tasks for Quantum Machine Learning (QML)
MIT License
14 stars 5 forks source link

We should fix elementwise comparison everywhere #27

Closed briling closed 3 months ago

briling commented 5 months ago

E.g.:

(qstack) 20:30:28-xe@dhcp-173-dist-b-103:~/GIT/Q-stack> pytest tests/test_global.py 
========================================================== test session starts ==========================================================
platform linux -- Python 3.9.7, pytest-6.2.5, py-1.11.0, pluggy-1.0.0
rootdir: /home/xe/GIT/Q-stack
collected 2 items                                                                                                                       

tests/test_global.py ..                                                                                                           [100%]

=========================================================== warnings summary ============================================================
tests/test_global.py::test_avg_kernel
tests/test_global.py::test_avg_kernel
tests/test_global.py::test_rem_kernel
tests/test_global.py::test_rem_kernel
  /home/xe/GIT/Q-stack/qstack/regression/kernel_utils.py:169: DeprecationWarning: elementwise comparison failed; this will raise an error in the future.
    if X[0] == Y[0]:

-- Docs: https://docs.pytest.org/en/stable/warnings.html
===================================================== 2 passed, 4 warnings in 0.38s =====================================================
YAY-C commented 3 months ago

closed by #63 *no other elementwise comparison was found throughout `qstack/`**