Open ReallyCoolBean opened 1 year ago
Hello,
I usually build a local environment using venv in a script (and in vscode), rather than conda or pycharm, but your approach should work ok.I would not try to change the numpy package versions; that just invites problems with multiple other packages.
The specific problem is actually with the Rudnicki and Hemmert wrapper to the a model, where they invoke fftpack. If you download their package and comment that line out (where the exception is raised), then make sure that the modified version is the one that is referenced, it should run ok. I think they released an update that may have addressed this issue, but depending on which branch you are trying to use, that may not have been tested or incorporated within cnmodel. Also make sure you are on the right branch. - specifically python3. I run using "BSD unix" under Mac osx, and it should not differ from what you need to do under any Linux distribution. I think that py3.7+ should be ok, there are no updated dependencies above that level at this point. I have been using this regularly in the past few months with python 3.10 in a pretty major project, but do recognize that it can be touchy to get everything working together.
Let me know if this helps, and if it doesn't, please send me the traceback.
Kind Regards,
--Paul
Paul B. Manis, Ph.D. Thomas J. Dark Distinguished Research Professor Dept. of Otolaryngology/Head and Neck Surgery Dept. of Cell Biology and Physiology The University of North Carolina at Chapel Hill
From: ReallyCoolBean @.***> Sent: Wednesday, February 8, 2023 6:40 AM To: cnmodel/cnmodel Cc: Subscribed Subject: [cnmodel/cnmodel] Issue with running test.py: AttributeError: module 'numpy.fft' has no attribute 'fftpack' (Issue #29)
Hello, I would like to work with CNmodel to run some simulations, but I am facing issues with installation. I run toy_model.py with no issues, but running test.py results in the following error: [image]https://user-images.githubusercontent.com/32000335/217515752-a5b78e40-654e-4c3d-a9a1-98c0f691658c.png I work on Ubuntu 22.04.1 LTS, I created a virtual environment with PyCharm, where I use a Python 3.7.16 interpreter. I followed the installation instructions here and ended up with the following list of packages (from pip freeze): asteval==0.9.28 attrs==22.2.0 -e @.***#egg=cnmodel cochlea==2 cycler==0.11.0 Cython==0.29.33 exceptiongroup==1.1.0 future==0.18.3 importlib-metadata==6.0.0 iniconfig==2.0.0 kiwisolver==1.4.4 llvmlite==0.39.1 lmfit==0.9.11 matplotlib==3.0.3 NEURON==8.2.2 nose==1.3.7 numba==0.56.4 numpy==1.21.6 packaging==23.0 pandas==1.3.5 pluggy==1.0.0 pyparsing==3.0.9 PyQt5==5.15.9 PyQt5-Qt5==5.15.2 PyQt5-sip==12.11.1 pyqtgraph==0.11.0 pytest==7.2.1 pytest-faulthandler==2.0.1 python-dateutil==2.8.2 pytz==2022.7.1 resampy==0.4.2 scipy==1.1.0 six==1.16.0 tomli==2.0.1 typing_extensions==4.4.0 uncertainties==3.1.7 zipp==3.12.1
I suspect I need a different version of Numpy, but when I downgrade to 1.14.3, I get a warning from PyCharm, that numpy>=1.1 is required and I get tonnes of other errors when running test.py. Any help would be much appreciated!
— Reply to this email directly, view it on GitHubhttps://github.com/cnmodel/cnmodel/issues/29, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAA72XQIEJH5R2NSHNIX66DWWOA3XANCNFSM6AAAAAAUVEVPPY. You are receiving this because you are subscribed to this thread.Message ID: @.***>
Dear Paul,
Thank you for your prompt reply! I installed the latest version of cochlea
package from PyPi, not from GitHub, so maybe I have not the most up-to-date version. Anyway, I followed your advice and commented out the if statement that was causing the error (line 120 and 121 in file cochlea/zilany2014/init.py). The attribute error disappeared, but I still have many assertion errors from other tests. I copied the output from running test.py
below. I also have an error from test_matlab.py
and I realised it is because I do not have matlabengine
package. I wanted to install it, but it was not possible in my environment. As I have MatLab2022b, I need one of the newer versions of matalabengine
, that are not compatible with Python 3.7. My system Python is actually 3.10, so not a problem for me to get a new virtual environment with Python 3.10 if, as you mentioned, CNmodel works with 3.10 as well. I only got Python 3.7, because it was one of the requirements mentioned in the documentation. But is MatLab necessary to run models with CNmodel? I understood from the documentation, that it is optional to use MatLab, as one can use cochlea
Python package to simulate AN inputs, instead of using Matlab-based model from Zilany. Or am I wrong?
Many thanks for your help so far!
Best wishes, Sabina Nowakowska
Testing with flags: -v --tb=short cnmodel/ --ignore=cnmodel/an_model/cache/ ===================================================================================================== test session starts ===================================================================================================== platform linux -- Python 3.7.16, pytest-7.2.1, pluggy-1.0.0 -- /home/sabina/Documents/PhD/CNModel/venv/python/bin/python cachedir: .pytest_cache rootdir: /home/sabina/Documents/PhD/CNModel/cnmodel collected 38 items
cnmodel/an_model/tests/test_cache.py::test_cache PASSED [ 2%] cnmodel/an_model/tests/test_cache.py::test_parallel PASSED [ 5%] cnmodel/cells/tests/test_cells.py::test_bushy PASSED [ 7%] cnmodel/cells/tests/test_cells.py::test_bushy21 PASSED [ 10%] cnmodel/cells/tests/test_cells.py::test_bushy_mouse PASSED [ 13%] cnmodel/cells/tests/test_cells.py::test_tstellate PASSED [ 15%] cnmodel/cells/tests/test_cells.py::test_tstellate_mouse PASSED [ 18%] cnmodel/cells/tests/test_cells.py::test_tstellatet PASSED [ 21%] cnmodel/cells/tests/test_cells.py::test_dstellate PASSED [ 23%] cnmodel/cells/tests/test_cells.py::test_dstellate_mouse PASSED [ 26%] cnmodel/cells/tests/test_cells.py::test_octopus PASSED [ 28%] cnmodel/cells/tests/test_cells.py::test_pyramidal PASSED [ 31%] cnmodel/cells/tests/test_cells.py::test_pyramidal_ceballos PASSED [ 34%] cnmodel/cells/tests/test_cells.py::test_tuberculoventral PASSED [ 36%] cnmodel/cells/tests/test_cells.py::test_cartwheel PASSED [ 39%] cnmodel/cells/tests/test_cells.py::test_sgc_basal_middle PASSED [ 42%] cnmodel/cells/tests/test_cells.py::test_sgc_apical PASSED [ 44%] cnmodel/cells/tests/test_cells.py::test_mso PASSED [ 47%] cnmodel/data/tests/test_db.py::test_db PASSED [ 50%] cnmodel/mechanisms/tests/test_mechanisms.py::test_max_open_probability FAILED [ 52%] cnmodel/synapses/tests/test_psd.py::test_sgc_bushy_psd PASSED [ 55%] cnmodel/synapses/tests/test_psd.py::test_sgc_tstellate_psd PASSED [ 57%] cnmodel/synapses/tests/test_psd.py::test_sgc_dstellate_psd PASSED [ 60%] cnmodel/synapses/tests/test_psd.py::test_sgc_octopus_psd PASSED [ 63%] cnmodel/synapses/tests/test_synapses.py::test_sgc_bushy FAILED [ 65%] cnmodel/synapses/tests/test_synapses.py::test_sgc_tstellate FAILED [ 68%] cnmodel/synapses/tests/test_synapses.py::test_sgc_tstellate2 FAILED [ 71%] cnmodel/synapses/tests/test_synapses.py::test_sgc_dstellate FAILED [ 73%] cnmodel/synapses/tests/test_synapses.py::test_dstellate_bushy FAILED [ 76%] cnmodel/synapses/tests/test_synapses.py::test_dstellate_tstellate FAILED [ 78%] cnmodel/synapses/tests/test_synapses.py::test_dstellate_dstellate FAILED [ 81%] cnmodel/util/tests/test_expfitting.py::test_fit1 PASSED [ 84%] cnmodel/util/tests/test_expfitting.py::test_fit2 PASSED [ 86%] cnmodel/util/tests/test_matlab.py::test_matlab FAILED [ 89%] cnmodel/util/tests/test_sound.py::test_conversions PASSED [ 92%] cnmodel/util/tests/test_sound.py::test_tonepip PASSED [ 94%] cnmodel/util/tests/test_sound.py::test_noisepip PASSED [ 97%] cnmodel/util/tests/test_stim.py::test_make_pulse PASSED [100%]
========================================================================================================== FAILURES =========================================================================================================== __ test_max_open_probability __ cnmodel/mechanisms/tests/test_mechanisms.py:36: in test_max_open_probability assert np.allclose(max(op[1]), npsd.MaxOpen) E assert False E + where False = <function allclose at 0x7f218a2be290>(4.461976908971173e-16, 0.0198889) E + where <function allclose at 0x7f218a2be290> = np.allclose E + and 4.461976908971173e-16 = max([0.0, 1.6665747465704637e-22, 4.27921634125633e-22, 4.0857545073757307e-22, 7.283389826508939e-22, 4.368899757669638e-17, ...]) E + and 0.0198889 = NMDA_Kampa[0].MaxOpen ___ test_sgc_bushy ____ cnmodel/synapses/tests/test_synapses.py:22: in test_sgc_bushy SynapseTester('sgc', 'bushy') cnmodel/synapses/tests/testsynapses.py:72: in init UserTester.init(self, "%s%s" % (pre, post), pre, post) cnmodel/util/user_tester.py:35: in init self.assert_test_info(*args, *kwds) cnmodel/synapses/tests/test_synapses.py:108: in assert_test_info super(SynapseTester, self).assert_test_info(args, **kwds) cnmodel/util/user_tester.py:154: in assert_test_info self.compare_results(None, result, expect) cnmodel/util/user_tester.py:67: in compare_results self.compare_results(k, info[k], expect[k]) cnmodel/util/user_tester.py:70: in compare_results self.compare_results(key, info[i], expect[i]) cnmodel/util/user_tester.py:97: in compare_results self.compare_results(k, info[k], expect[k]) cnmodel/util/user_tester.py:94: in compare_results assert np.allclose(info[mask], expect[mask], rtol=self.rtol) E AssertionError ---------------------------------------------------------------------------------------------------- Captured stdout call ----------------------------------------------------------------------------------------------------- Elapsed time for 1 Repetitions: 6.867311
Comparing data array, shapes match: True Model tested: sgc_bushy, measure: rise time args: ['add', 'class', 'contains', 'delattr', 'dir', 'doc', 'eq', 'format', 'ge', 'getattribute', 'getitem', 'getnewargs', 'gt', 'hash', 'init', 'init_subclass', 'iter', 'le', 'len', 'lt', 'mod', 'mul', 'ne', 'new', 'reduce', 'reduce_ex', 'repr', 'rmod', 'rmul', 'setattr', 'sizeof', 'str', 'subclasshook', 'capitalize', 'casefold', 'center', 'count', 'encode', 'endswith', 'expandtabs', 'find', 'format', 'formatmap', 'index', 'isalnum', 'isalpha', 'isascii', 'isdecimal', 'isdigit', 'isidentifier', 'islower', 'isnumeric', 'isprintable', 'isspace', 'istitle', 'isupper', 'join', 'ljust', 'lower', 'lstrip', 'maketrans', 'partition', 'replace', 'rfind', 'rindex', 'rjust', 'rpartition', 'rsplit', 'rstrip', 'split', 'splitlines', 'startswith', 'strip', 'swapcase', 'title', 'translate', 'upper', 'zfill'] Array expected: [0.13030221 0.12689413 0.15776253 0.12518961 0.15403892 0.15031173 0.14999838 0.14959451 0.15207041 0.14871827] Array received: [0.12990024 0.12679544 0.15763125 0.12513097 0.15396506 0.15028471 0.1500004 0.14958562 0.15204367 0.14869695] args[0]: sgc args[0] is string: sgc ____ test_sgc_tstellate __ cnmodel/synapses/tests/test_synapses.py:25: in test_sgc_tstellate SynapseTester('sgc', 'tstellate') cnmodel/synapses/tests/testsynapses.py:72: in init UserTester.init(self, "%s%s" % (pre, post), pre, post) cnmodel/util/user_tester.py:35: in init self.assert_test_info(*args, *kwds) cnmodel/synapses/tests/test_synapses.py:108: in assert_test_info super(SynapseTester, self).assert_test_info(args, **kwds) cnmodel/util/user_tester.py:154: in assert_test_info self.compare_results(None, result, expect) cnmodel/util/user_tester.py:67: in compare_results self.compare_results(k, info[k], expect[k]) cnmodel/util/user_tester.py:70: in compare_results self.compare_results(key, info[i], expect[i]) cnmodel/util/user_tester.py:97: in compare_results self.compare_results(k, info[k], expect[k]) cnmodel/util/user_tester.py:94: in compare_results assert np.allclose(info[mask], expect[mask], rtol=self.rtol) E AssertionError ---------------------------------------------------------------------------------------------------- Captured stdout call ----------------------------------------------------------------------------------------------------- Elapsed time for 1 Repetitions: 0.689052
Comparing data array, shapes match: True Model tested: sgc_tstellate, measure: 20% latency args: ['add', 'class', 'contains', 'delattr', 'dir', 'doc', 'eq', 'format', 'ge', 'getattribute', 'getitem', 'getnewargs', 'gt', 'hash', 'init', 'init_subclass', 'iter', 'le', 'len', 'lt', 'mod', 'mul', 'ne', 'new', 'reduce', 'reduce_ex', 'repr', 'rmod', 'rmul', 'setattr', 'sizeof', 'str', 'subclasshook', 'capitalize', 'casefold', 'center', 'count', 'encode', 'endswith', 'expandtabs', 'find', 'format', 'formatmap', 'index', 'isalnum', 'isalpha', 'isascii', 'isdecimal', 'isdigit', 'isidentifier', 'islower', 'isnumeric', 'isprintable', 'isspace', 'istitle', 'isupper', 'join', 'ljust', 'lower', 'lstrip', 'maketrans', 'partition', 'replace', 'rfind', 'rindex', 'rjust', 'rpartition', 'rsplit', 'rstrip', 'split', 'splitlines', 'startswith', 'strip', 'swapcase', 'title', 'translate', 'upper', 'zfill'] Array expected: [0.69308864 0.79556712 0.74559008 0.77344193 0.77430411 0.82386196 0.74595242 0.8241403 0.77463667 0.7999326 ] Array received: [0.69434415 0.79589992 0.74570349 0.77357376 0.77429169 0.82386061 0.74596277 0.8242256 0.77464264 0.79993472] args[0]: sgc args[0] is string: sgc ____ test_sgctstellate2 ____ cnmodel/synapses/tests/test_synapses.py:28: in test_sgc_tstellate2 SynapseTester('sgc', 'tstellate') cnmodel/synapses/tests/testsynapses.py:72: in init UserTester.init(self, "%s%s" % (pre, post), pre, post) cnmodel/util/user_tester.py:35: in init self.assert_test_info(*args, *kwds) cnmodel/synapses/tests/test_synapses.py:108: in assert_test_info super(SynapseTester, self).assert_test_info(args, **kwds) cnmodel/util/user_tester.py:154: in assert_test_info self.compare_results(None, result, expect) cnmodel/util/user_tester.py:67: in compare_results self.compare_results(k, info[k], expect[k]) cnmodel/util/user_tester.py:70: in compare_results self.compare_results(key, info[i], expect[i]) cnmodel/util/user_tester.py:97: in compare_results self.compare_results(k, info[k], expect[k]) cnmodel/util/user_tester.py:94: in compare_results assert np.allclose(info[mask], expect[mask], rtol=self.rtol) E AssertionError ---------------------------------------------------------------------------------------------------- Captured stdout call ----------------------------------------------------------------------------------------------------- Elapsed time for 1 Repetitions: 0.673543
Comparing data array, shapes match: True Model tested: sgc_tstellate, measure: 20% latency args: ['add', 'class', 'contains', 'delattr', 'dir', 'doc', 'eq', 'format', 'ge', 'getattribute', 'getitem', 'getnewargs', 'gt', 'hash', 'init', 'init_subclass', 'iter', 'le', 'len', 'lt', 'mod', 'mul', 'ne', 'new', 'reduce', 'reduce_ex', 'repr', 'rmod', 'rmul', 'setattr', 'sizeof', 'str', 'subclasshook', 'capitalize', 'casefold', 'center', 'count', 'encode', 'endswith', 'expandtabs', 'find', 'format', 'formatmap', 'index', 'isalnum', 'isalpha', 'isascii', 'isdecimal', 'isdigit', 'isidentifier', 'islower', 'isnumeric', 'isprintable', 'isspace', 'istitle', 'isupper', 'join', 'ljust', 'lower', 'lstrip', 'maketrans', 'partition', 'replace', 'rfind', 'rindex', 'rjust', 'rpartition', 'rsplit', 'rstrip', 'split', 'splitlines', 'startswith', 'strip', 'swapcase', 'title', 'translate', 'upper', 'zfill'] Array expected: [0.69308864 0.79556712 0.74559008 0.77344193 0.77430411 0.82386196 0.74595242 0.8241403 0.77463667 0.7999326 ] Array received: [0.69434415 0.79589992 0.74570349 0.77357376 0.77429169 0.82386061 0.74596277 0.8242256 0.77464264 0.79993472] args[0]: sgc args[0] is string: sgc ____ test_sgc_dstellate __ cnmodel/synapses/tests/test_synapses.py:31: in test_sgc_dstellate SynapseTester('sgc', 'dstellate') cnmodel/synapses/tests/testsynapses.py:72: in init UserTester.init(self, "%s%s" % (pre, post), pre, post) cnmodel/util/user_tester.py:35: in init self.assert_test_info(*args, *kwds) cnmodel/synapses/tests/test_synapses.py:108: in assert_test_info super(SynapseTester, self).assert_test_info(args, **kwds) cnmodel/util/user_tester.py:154: in assert_test_info self.compare_results(None, result, expect) cnmodel/util/user_tester.py:67: in compare_results self.compare_results(k, info[k], expect[k]) cnmodel/util/user_tester.py:70: in compare_results self.compare_results(key, info[i], expect[i]) cnmodel/util/user_tester.py:97: in compare_results self.compare_results(k, info[k], expect[k]) cnmodel/util/user_tester.py:94: in compare_results assert np.allclose(info[mask], expect[mask], rtol=self.rtol) E AssertionError ---------------------------------------------------------------------------------------------------- Captured stdout call ----------------------------------------------------------------------------------------------------- Elapsed time for 1 Repetitions: 0.378907
Comparing data array, shapes match: True Model tested: sgc_dstellate, measure: 20% latency args: ['add', 'class', 'contains', 'delattr', 'dir', 'doc', 'eq', 'format', 'ge', 'getattribute', 'getitem', 'getnewargs', 'gt', 'hash', 'init', 'init_subclass', 'iter', 'le', 'len', 'lt', 'mod', 'mul', 'ne', 'new', 'reduce', 'reduce_ex', 'repr', 'rmod', 'rmul', 'setattr', 'sizeof', 'str', 'subclasshook', 'capitalize', 'casefold', 'center', 'count', 'encode', 'endswith', 'expandtabs', 'find', 'format', 'format_map', 'index', 'isalnum', 'isalpha', 'isascii', 'isdecimal', 'isdigit', 'isidentifier', 'islower', 'isnumeric', 'isprintable', 'isspace', 'istitle', 'isupper', 'join', 'ljust', 'lower', 'lstrip', 'maketrans', 'partition', 'replace', 'rfind', 'rindex', 'rjust', 'rpartition', 'rsplit', 'rstrip', 'split', 'splitlines', 'startswith', 'strip', 'swapcase', 'title', 'translate', 'upper', 'zfill'] Array expected: [0.69758345 0.72334678 0.74589235 0.8474736 0.72313864 0.7938418 0.84974859 0.82062624 0.84822158 0.84544384] Array received: [0.69895612 0.72346767 0.74590778 0.84750019 0.72314556 0.79468527 0.84976285 0.82063297 0.84822449 0.84545507] args[0]: sgc args[0] is string: sgc ____ test_dstellatebushy ____ cnmodel/synapses/tests/test_synapses.py:34: in test_dstellate_bushy SynapseTester('dstellate', 'bushy') cnmodel/synapses/tests/testsynapses.py:72: in init UserTester.init(self, "%s%s" % (pre, post), pre, post) cnmodel/util/user_tester.py:35: in init self.assert_test_info(*args, *kwds) cnmodel/synapses/tests/test_synapses.py:108: in assert_test_info super(SynapseTester, self).assert_test_info(args, **kwds) cnmodel/util/user_tester.py:154: in assert_test_info self.compare_results(None, result, expect) cnmodel/util/user_tester.py:67: in compare_results self.compare_results(k, info[k], expect[k]) cnmodel/util/user_tester.py:70: in compare_results self.compare_results(key, info[i], expect[i]) cnmodel/util/user_tester.py:97: in compare_results self.compare_results(k, info[k], expect[k]) cnmodel/util/user_tester.py:94: in compare_results assert np.allclose(info[mask], expect[mask], rtol=self.rtol) E AssertionError ---------------------------------------------------------------------------------------------------- Captured stdout call ----------------------------------------------------------------------------------------------------- Elapsed time for 1 Repetitions: 0.954070
Comparing data array, shapes match: True Model tested: dstellate_bushy, measure: 20% latency args: ['add', 'class', 'contains', 'delattr', 'dir', 'doc', 'eq', 'format', 'ge', 'getattribute', 'getitem', 'getnewargs', 'gt', 'hash', 'init', 'init_subclass', 'iter', 'le', 'len', 'lt', 'mod', 'mul', 'ne', 'new', 'reduce', 'reduce_ex', 'repr', 'rmod', 'rmul', 'setattr', 'sizeof', 'str', 'subclasshook', 'capitalize', 'casefold', 'center', 'count', 'encode', 'endswith', 'expandtabs', 'find', 'format', 'format_map', 'index', 'isalnum', 'isalpha', 'isascii', 'isdecimal', 'isdigit', 'isidentifier', 'islower', 'isnumeric', 'isprintable', 'isspace', 'istitle', 'isupper', 'join', 'ljust', 'lower', 'lstrip', 'maketrans', 'partition', 'replace', 'rfind', 'rindex', 'rjust', 'rpartition', 'rsplit', 'rstrip', 'split', 'splitlines', 'startswith', 'strip', 'swapcase', 'title', 'translate', 'upper', 'zfill'] Array expected: [0.79418947 0.84940772 0.87459424 0.87468865 0.87456684 0.92467369 0.92437739 0.94899433 0.94971789 0.92495172] Array received: [0.76918947 0.82440772 0.84959424 0.84968865 0.84956684 0.89967369 0.89937739 0.92399433 0.92471789 0.89995172] args[0]: dstellate args[0] is string: dstellate __ test_dstellate_tstellate ___ cnmodel/synapses/tests/test_synapses.py:37: in test_dstellate_tstellate SynapseTester('dstellate', 'tstellate') cnmodel/synapses/tests/testsynapses.py:72: in init UserTester.init(self, "%s%s" % (pre, post), pre, post) cnmodel/util/user_tester.py:35: in init self.assert_test_info(*args, *kwds) cnmodel/synapses/tests/test_synapses.py:108: in assert_test_info super(SynapseTester, self).assert_test_info(args, **kwds) cnmodel/util/user_tester.py:154: in assert_test_info self.compare_results(None, result, expect) cnmodel/util/user_tester.py:67: in compare_results self.compare_results(k, info[k], expect[k]) cnmodel/util/user_tester.py:70: in compare_results self.compare_results(key, info[i], expect[i]) cnmodel/util/user_tester.py:97: in compare_results self.compare_results(k, info[k], expect[k]) cnmodel/util/user_tester.py:94: in compare_results assert np.allclose(info[mask], expect[mask], rtol=self.rtol) E AssertionError ---------------------------------------------------------------------------------------------------- Captured stdout call ----------------------------------------------------------------------------------------------------- Elapsed time for 1 Repetitions: 0.753272
Comparing data array, shapes match: True Model tested: dstellate_tstellate, measure: 20% latency args: ['add', 'class', 'contains', 'delattr', 'dir', 'doc', 'eq', 'format', 'ge', 'getattribute', 'getitem', 'getnewargs', 'gt', 'hash', 'init', 'init_subclass', 'iter', 'le', 'len', 'lt', 'mod', 'mul', 'ne', 'new', 'reduce', 'reduce_ex', 'repr', 'rmod', 'rmul', 'setattr', 'sizeof', 'str', 'subclasshook', 'capitalize', 'casefold', 'center', 'count', 'encode', 'endswith', 'expandtabs', 'find', 'format', 'format_map', 'index', 'isalnum', 'isalpha', 'isascii', 'isdecimal', 'isdigit', 'isidentifier', 'islower', 'isnumeric', 'isprintable', 'isspace', 'istitle', 'isupper', 'join', 'ljust', 'lower', 'lstrip', 'maketrans', 'partition', 'replace', 'rfind', 'rindex', 'rjust', 'rpartition', 'rsplit', 'rstrip', 'split', 'splitlines', 'startswith', 'strip', 'swapcase', 'title', 'translate', 'upper', 'zfill'] Array expected: [0.64526165 0.66481897 0.77401916 0.74851229 0.72098648 0.74244124 0.77376867 0.79760721 0.7985437 0.7484276 ] Array received: [0.62026165 0.63981897 0.74901916 0.72351229 0.69598648 0.71744124 0.74876867 0.77260721 0.7735437 0.7234276 ] args[0]: dstellate args[0] is string: dstellate __ test_dstellate_dstellate _ cnmodel/synapses/tests/test_synapses.py:40: in test_dstellate_dstellate SynapseTester('dstellate', 'dstellate') cnmodel/synapses/tests/testsynapses.py:72: in init UserTester.init(self, "%s%s" % (pre, post), pre, post) cnmodel/util/user_tester.py:35: in init self.assert_test_info(*args, *kwds) cnmodel/synapses/tests/test_synapses.py:108: in assert_test_info super(SynapseTester, self).assert_test_info(args, **kwds) cnmodel/util/user_tester.py:154: in assert_test_info self.compare_results(None, result, expect) cnmodel/util/user_tester.py:67: in compare_results self.compare_results(k, info[k], expect[k]) cnmodel/util/user_tester.py:70: in compare_results self.compare_results(key, info[i], expect[i]) cnmodel/util/user_tester.py:97: in compare_results self.compare_results(k, info[k], expect[k]) cnmodel/util/user_tester.py:80: in compare_results assert np.all(inans == enans) E AssertionError ---------------------------------------------------------------------------------------------------- Captured stdout call ----------------------------------------------------------------------------------------------------- Elapsed time for 1 Repetitions: 0.312217 ___ testmatlab ____ cnmodel/util/tests/test_matlab.py:14: in test_matlab proc = matlab.engine.start_matlab() E NameError: name 'matlab' is not defined ====================================================================================================== warnings summary ======================================================================================================= ../venv/python/lib/python3.7/site-packages/scipy/linalg/init.py:212 /home/sabina/Documents/PhD/CNModel/venv/python/lib/python3.7/site-packages/scipy/linalg/init.py:212: DeprecationWarning: The module numpy.dual is deprecated. Instead of using dual, use the functions directly from numpy or scipy. from numpy.dual import register_func
../venv/python/lib/python3.7/site-packages/scipy/special/orthogonal.py:81
../venv/python/lib/python3.7/site-packages/scipy/special/orthogonal.py:81
/home/sabina/Documents/PhD/CNModel/venv/python/lib/python3.7/site-packages/scipy/special/orthogonal.py:81: DeprecationWarning: np.int
is a deprecated alias for the builtin int
. To silence this warning, use int
by itself. Doing this will not modify any behavior and is safe. When replacing np.int
, you may wish to use e.g. np.int64
or np.int32
to specify the precision. If you wish to review your current use, check the release note link for additional information.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
from numpy import (exp, inf, pi, sqrt, floor, sin, cos, around, int,
../venv/python/lib/python3.7/site-packages/scipy/spatial/_spherical_voronoi.py:15 /home/sabina/Documents/PhD/CNModel/venv/python/lib/python3.7/site-packages/scipy/spatial/_spherical_voronoi.py:15: PendingDeprecationWarning: Importing from numpy.matlib is deprecated since 1.19.0. The matrix subclass is not the recommended way to represent matrices or deal with linear algebra (see https://docs.scipy.org/doc/numpy/user/numpy-for-matlab-users.html). Please adjust your code to use regular ndarray. import numpy.matlib
../venv/python/lib/python3.7/site-packages/scipy/io/matlab/mio5.py:98
/home/sabina/Documents/PhD/CNModel/venv/python/lib/python3.7/site-packages/scipy/io/matlab/mio5.py:98: DeprecationWarning: np.bool
is a deprecated alias for the builtin bool
. To silence this warning, use bool
by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.bool_
here.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
from .mio5_utils import VarReader5
../venv/python/lib/python3.7/site-packages/matplotlib/init.py:186 ../venv/python/lib/python3.7/site-packages/matplotlib/init.py:186 /home/sabina/Documents/PhD/CNModel/venv/python/lib/python3.7/site-packages/matplotlib/init.py:186: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. a = distutils.version.LooseVersion(a)
../venv/python/lib/python3.7/site-packages/matplotlib/init.py:187 ../venv/python/lib/python3.7/site-packages/matplotlib/init.py:187 /home/sabina/Documents/PhD/CNModel/venv/python/lib/python3.7/site-packages/matplotlib/init.py:187: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. b = distutils.version.LooseVersion(b)
cnmodel/an_model/tests/test_cache.py::test_cache
/home/sabina/Documents/PhD/CNModel/venv/python/lib/python3.7/site-packages/scipy/signal/_arraytools.py:45: FutureWarning: Using a non-tuple sequence for multidimensional indexing is deprecated; use arr[tuple(seq)]
instead of arr[seq]
. In the future this will be interpreted as an array index, arr[np.array(seq)]
, which will result either in an error or a different result.
b = a[a_slice]
cnmodel/an_model/tests/test_cache.py::test_cache
/home/sabina/Documents/PhD/CNModel/venv/python/lib/python3.7/site-packages/scipy/signal/signaltools.py:1341: FutureWarning: Using a non-tuple sequence for multidimensional indexing is deprecated; use arr[tuple(seq)]
instead of arr[seq]
. In the future this will be interpreted as an array index, arr[np.array(seq)]
, which will result either in an error or a different result.
out_full[ind] += zi
cnmodel/an_model/tests/test_cache.py::test_cache
/home/sabina/Documents/PhD/CNModel/venv/python/lib/python3.7/site-packages/scipy/signal/signaltools.py:1344: FutureWarning: Using a non-tuple sequence for multidimensional indexing is deprecated; use arr[tuple(seq)]
instead of arr[seq]
. In the future this will be interpreted as an array index, arr[np.array(seq)]
, which will result either in an error or a different result.
out = out_full[ind]
cnmodel/an_model/tests/test_cache.py::test_cache
/home/sabina/Documents/PhD/CNModel/venv/python/lib/python3.7/site-packages/scipy/signal/signaltools.py:1350: FutureWarning: Using a non-tuple sequence for multidimensional indexing is deprecated; use arr[tuple(seq)]
instead of arr[seq]
. In the future this will be interpreted as an array index, arr[np.array(seq)]
, which will result either in an error or a different result.
zf = out_full[ind]
cnmodel/cells/tests/test_cells.py: 57743 warnings
/home/sabina/Documents/PhD/CNModel/venv/python/lib/python3.7/site-packages/lmfit/model.py:626: DeprecationWarning: np.complex
is a deprecated alias for the builtin complex
. To silence this warning, use complex
by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.complex128
here.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
if diff.dtype == np.complex:
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =================================================================================================== short test summary info =================================================================================================== FAILED cnmodel/mechanisms/tests/test_mechanisms.py::test_max_open_probability - assert False FAILED cnmodel/synapses/tests/test_synapses.py::test_sgc_bushy - AssertionError FAILED cnmodel/synapses/tests/test_synapses.py::test_sgc_tstellate - AssertionError FAILED cnmodel/synapses/tests/test_synapses.py::test_sgc_tstellate2 - AssertionError FAILED cnmodel/synapses/tests/test_synapses.py::test_sgc_dstellate - AssertionError FAILED cnmodel/synapses/tests/test_synapses.py::test_dstellate_bushy - AssertionError FAILED cnmodel/synapses/tests/test_synapses.py::test_dstellate_tstellate - AssertionError FAILED cnmodel/synapses/tests/test_synapses.py::test_dstellate_dstellate - AssertionError FAILED cnmodel/util/tests/test_matlab.py::test_matlab - NameError: name 'matlab' is not defined =================================================================================== 9 failed, 29 passed, 57756 warnings in 88.95s (0:01:28) =================================================================================== (python) sabina@sabina-asuslaptop:~/Documents/PhD/CNModel/cnmodel$ python test.py Testing with flags: -v --tb=short cnmodel/ --ignore=cnmodel/an_model/cache/ ===================================================================================================== test session starts ===================================================================================================== platform linux -- Python 3.7.16, pytest-7.2.1, pluggy-1.0.0 -- /home/sabina/Documents/PhD/CNModel/venv/python/bin/python cachedir: .pytest_cache rootdir: /home/sabina/Documents/PhD/CNModel/cnmodel collected 38 items
cnmodel/an_model/tests/test_cache.py::test_cache PASSED [ 2%] cnmodel/an_model/tests/test_cache.py::test_parallel PASSED [ 5%] cnmodel/cells/tests/test_cells.py::test_bushy PASSED [ 7%] cnmodel/cells/tests/test_cells.py::test_bushy21 PASSED [ 10%] cnmodel/cells/tests/test_cells.py::test_bushy_mouse PASSED [ 13%] cnmodel/cells/tests/test_cells.py::test_tstellate PASSED [ 15%] cnmodel/cells/tests/test_cells.py::test_tstellate_mouse PASSED [ 18%] cnmodel/cells/tests/test_cells.py::test_tstellatet PASSED [ 21%] cnmodel/cells/tests/test_cells.py::test_dstellate PASSED [ 23%] cnmodel/cells/tests/test_cells.py::test_dstellate_mouse PASSED [ 26%] cnmodel/cells/tests/test_cells.py::test_octopus PASSED [ 28%] cnmodel/cells/tests/test_cells.py::test_pyramidal PASSED [ 31%] cnmodel/cells/tests/test_cells.py::test_pyramidal_ceballos PASSED [ 34%] cnmodel/cells/tests/test_cells.py::test_tuberculoventral PASSED [ 36%] cnmodel/cells/tests/test_cells.py::test_cartwheel PASSED [ 39%] cnmodel/cells/tests/test_cells.py::test_sgc_basal_middle PASSED [ 42%] cnmodel/cells/tests/test_cells.py::test_sgc_apical PASSED [ 44%] cnmodel/cells/tests/test_cells.py::test_mso PASSED [ 47%] cnmodel/data/tests/test_db.py::test_db PASSED [ 50%] cnmodel/mechanisms/tests/test_mechanisms.py::test_max_open_probability FAILED [ 52%] cnmodel/synapses/tests/test_psd.py::test_sgc_bushy_psd PASSED [ 55%] cnmodel/synapses/tests/test_psd.py::test_sgc_tstellate_psd PASSED [ 57%] cnmodel/synapses/tests/test_psd.py::test_sgc_dstellate_psd PASSED [ 60%] cnmodel/synapses/tests/test_psd.py::test_sgc_octopus_psd PASSED [ 63%] cnmodel/synapses/tests/test_synapses.py::test_sgc_bushy FAILED [ 65%] cnmodel/synapses/tests/test_synapses.py::test_sgc_tstellate FAILED [ 68%] cnmodel/synapses/tests/test_synapses.py::test_sgc_tstellate2 FAILED [ 71%] cnmodel/synapses/tests/test_synapses.py::test_sgc_dstellate FAILED [ 73%] cnmodel/synapses/tests/test_synapses.py::test_dstellate_bushy FAILED [ 76%] cnmodel/synapses/tests/test_synapses.py::test_dstellate_tstellate FAILED [ 78%] cnmodel/synapses/tests/test_synapses.py::test_dstellate_dstellate FAILED [ 81%] cnmodel/util/tests/test_expfitting.py::test_fit1 PASSED [ 84%] cnmodel/util/tests/test_expfitting.py::test_fit2 PASSED [ 86%] cnmodel/util/tests/test_matlab.py::test_matlab FAILED [ 89%] cnmodel/util/tests/test_sound.py::test_conversions PASSED [ 92%] cnmodel/util/tests/test_sound.py::test_tonepip PASSED [ 94%] cnmodel/util/tests/test_sound.py::test_noisepip PASSED [ 97%] cnmodel/util/tests/test_stim.py::test_make_pulse PASSED [100%]
========================================================================================================== FAILURES =========================================================================================================== __ test_max_open_probability __ cnmodel/mechanisms/tests/test_mechanisms.py:36: in test_max_open_probability assert np.allclose(max(op[1]), npsd.MaxOpen) E assert False E + where False = <function allclose at 0x7fd87f456290>(4.461976908971173e-16, 0.0198889) E + where <function allclose at 0x7fd87f456290> = np.allclose E + and 4.461976908971173e-16 = max([0.0, 1.6665747465704637e-22, 4.27921634125633e-22, 4.0857545073757307e-22, 7.283389826508939e-22, 4.368899757669638e-17, ...]) E + and 0.0198889 = NMDA_Kampa[0].MaxOpen ___ test_sgc_bushy ____ cnmodel/synapses/tests/test_synapses.py:22: in test_sgc_bushy SynapseTester('sgc', 'bushy') cnmodel/synapses/tests/testsynapses.py:72: in init UserTester.init(self, "%s%s" % (pre, post), pre, post) cnmodel/util/user_tester.py:35: in init self.assert_test_info(*args, *kwds) cnmodel/synapses/tests/test_synapses.py:108: in assert_test_info super(SynapseTester, self).assert_test_info(args, **kwds) cnmodel/util/user_tester.py:154: in assert_test_info self.compare_results(None, result, expect) cnmodel/util/user_tester.py:67: in compare_results self.compare_results(k, info[k], expect[k]) cnmodel/util/user_tester.py:70: in compare_results self.compare_results(key, info[i], expect[i]) cnmodel/util/user_tester.py:97: in compare_results self.compare_results(k, info[k], expect[k]) cnmodel/util/user_tester.py:94: in compare_results assert np.allclose(info[mask], expect[mask], rtol=self.rtol) E AssertionError ---------------------------------------------------------------------------------------------------- Captured stdout call ----------------------------------------------------------------------------------------------------- Elapsed time for 1 Repetitions: 7.337993
Comparing data array, shapes match: True Model tested: sgc_bushy, measure: rise time args: ['add', 'class', 'contains', 'delattr', 'dir', 'doc', 'eq', 'format', 'ge', 'getattribute', 'getitem', 'getnewargs', 'gt', 'hash', 'init', 'init_subclass', 'iter', 'le', 'len', 'lt', 'mod', 'mul', 'ne', 'new', 'reduce', 'reduce_ex', 'repr', 'rmod', 'rmul', 'setattr', 'sizeof', 'str', 'subclasshook', 'capitalize', 'casefold', 'center', 'count', 'encode', 'endswith', 'expandtabs', 'find', 'format', 'formatmap', 'index', 'isalnum', 'isalpha', 'isascii', 'isdecimal', 'isdigit', 'isidentifier', 'islower', 'isnumeric', 'isprintable', 'isspace', 'istitle', 'isupper', 'join', 'ljust', 'lower', 'lstrip', 'maketrans', 'partition', 'replace', 'rfind', 'rindex', 'rjust', 'rpartition', 'rsplit', 'rstrip', 'split', 'splitlines', 'startswith', 'strip', 'swapcase', 'title', 'translate', 'upper', 'zfill'] Array expected: [0.13030221 0.12689413 0.15776253 0.12518961 0.15403892 0.15031173 0.14999838 0.14959451 0.15207041 0.14871827] Array received: [0.12990024 0.12679544 0.15763125 0.12513097 0.15396506 0.15028471 0.1500004 0.14958562 0.15204367 0.14869695] args[0]: sgc args[0] is string: sgc ____ test_sgc_tstellate __ cnmodel/synapses/tests/test_synapses.py:25: in test_sgc_tstellate SynapseTester('sgc', 'tstellate') cnmodel/synapses/tests/testsynapses.py:72: in init UserTester.init(self, "%s%s" % (pre, post), pre, post) cnmodel/util/user_tester.py:35: in init self.assert_test_info(*args, *kwds) cnmodel/synapses/tests/test_synapses.py:108: in assert_test_info super(SynapseTester, self).assert_test_info(args, **kwds) cnmodel/util/user_tester.py:154: in assert_test_info self.compare_results(None, result, expect) cnmodel/util/user_tester.py:67: in compare_results self.compare_results(k, info[k], expect[k]) cnmodel/util/user_tester.py:70: in compare_results self.compare_results(key, info[i], expect[i]) cnmodel/util/user_tester.py:97: in compare_results self.compare_results(k, info[k], expect[k]) cnmodel/util/user_tester.py:94: in compare_results assert np.allclose(info[mask], expect[mask], rtol=self.rtol) E AssertionError ---------------------------------------------------------------------------------------------------- Captured stdout call ----------------------------------------------------------------------------------------------------- Elapsed time for 1 Repetitions: 0.612235
Comparing data array, shapes match: True Model tested: sgc_tstellate, measure: 20% latency args: ['add', 'class', 'contains', 'delattr', 'dir', 'doc', 'eq', 'format', 'ge', 'getattribute', 'getitem', 'getnewargs', 'gt', 'hash', 'init', 'init_subclass', 'iter', 'le', 'len', 'lt', 'mod', 'mul', 'ne', 'new', 'reduce', 'reduce_ex', 'repr', 'rmod', 'rmul', 'setattr', 'sizeof', 'str', 'subclasshook', 'capitalize', 'casefold', 'center', 'count', 'encode', 'endswith', 'expandtabs', 'find', 'format', 'formatmap', 'index', 'isalnum', 'isalpha', 'isascii', 'isdecimal', 'isdigit', 'isidentifier', 'islower', 'isnumeric', 'isprintable', 'isspace', 'istitle', 'isupper', 'join', 'ljust', 'lower', 'lstrip', 'maketrans', 'partition', 'replace', 'rfind', 'rindex', 'rjust', 'rpartition', 'rsplit', 'rstrip', 'split', 'splitlines', 'startswith', 'strip', 'swapcase', 'title', 'translate', 'upper', 'zfill'] Array expected: [0.69308864 0.79556712 0.74559008 0.77344193 0.77430411 0.82386196 0.74595242 0.8241403 0.77463667 0.7999326 ] Array received: [0.69434415 0.79589992 0.74570349 0.77357376 0.77429169 0.82386061 0.74596277 0.8242256 0.77464264 0.79993472] args[0]: sgc args[0] is string: sgc ____ test_sgctstellate2 ____ cnmodel/synapses/tests/test_synapses.py:28: in test_sgc_tstellate2 SynapseTester('sgc', 'tstellate') cnmodel/synapses/tests/testsynapses.py:72: in init UserTester.init(self, "%s%s" % (pre, post), pre, post) cnmodel/util/user_tester.py:35: in init self.assert_test_info(*args, *kwds) cnmodel/synapses/tests/test_synapses.py:108: in assert_test_info super(SynapseTester, self).assert_test_info(args, **kwds) cnmodel/util/user_tester.py:154: in assert_test_info self.compare_results(None, result, expect) cnmodel/util/user_tester.py:67: in compare_results self.compare_results(k, info[k], expect[k]) cnmodel/util/user_tester.py:70: in compare_results self.compare_results(key, info[i], expect[i]) cnmodel/util/user_tester.py:97: in compare_results self.compare_results(k, info[k], expect[k]) cnmodel/util/user_tester.py:94: in compare_results assert np.allclose(info[mask], expect[mask], rtol=self.rtol) E AssertionError ---------------------------------------------------------------------------------------------------- Captured stdout call ----------------------------------------------------------------------------------------------------- Elapsed time for 1 Repetitions: 0.634601
Comparing data array, shapes match: True Model tested: sgc_tstellate, measure: 20% latency args: ['add', 'class', 'contains', 'delattr', 'dir', 'doc', 'eq', 'format', 'ge', 'getattribute', 'getitem', 'getnewargs', 'gt', 'hash', 'init', 'init_subclass', 'iter', 'le', 'len', 'lt', 'mod', 'mul', 'ne', 'new', 'reduce', 'reduce_ex', 'repr', 'rmod', 'rmul', 'setattr', 'sizeof', 'str', 'subclasshook', 'capitalize', 'casefold', 'center', 'count', 'encode', 'endswith', 'expandtabs', 'find', 'format', 'formatmap', 'index', 'isalnum', 'isalpha', 'isascii', 'isdecimal', 'isdigit', 'isidentifier', 'islower', 'isnumeric', 'isprintable', 'isspace', 'istitle', 'isupper', 'join', 'ljust', 'lower', 'lstrip', 'maketrans', 'partition', 'replace', 'rfind', 'rindex', 'rjust', 'rpartition', 'rsplit', 'rstrip', 'split', 'splitlines', 'startswith', 'strip', 'swapcase', 'title', 'translate', 'upper', 'zfill'] Array expected: [0.69308864 0.79556712 0.74559008 0.77344193 0.77430411 0.82386196 0.74595242 0.8241403 0.77463667 0.7999326 ] Array received: [0.69434415 0.79589992 0.74570349 0.77357376 0.77429169 0.82386061 0.74596277 0.8242256 0.77464264 0.79993472] args[0]: sgc args[0] is string: sgc ____ test_sgc_dstellate __ cnmodel/synapses/tests/test_synapses.py:31: in test_sgc_dstellate SynapseTester('sgc', 'dstellate') cnmodel/synapses/tests/testsynapses.py:72: in init UserTester.init(self, "%s%s" % (pre, post), pre, post) cnmodel/util/user_tester.py:35: in init self.assert_test_info(*args, *kwds) cnmodel/synapses/tests/test_synapses.py:108: in assert_test_info super(SynapseTester, self).assert_test_info(args, **kwds) cnmodel/util/user_tester.py:154: in assert_test_info self.compare_results(None, result, expect) cnmodel/util/user_tester.py:67: in compare_results self.compare_results(k, info[k], expect[k]) cnmodel/util/user_tester.py:70: in compare_results self.compare_results(key, info[i], expect[i]) cnmodel/util/user_tester.py:97: in compare_results self.compare_results(k, info[k], expect[k]) cnmodel/util/user_tester.py:94: in compare_results assert np.allclose(info[mask], expect[mask], rtol=self.rtol) E AssertionError ---------------------------------------------------------------------------------------------------- Captured stdout call ----------------------------------------------------------------------------------------------------- Elapsed time for 1 Repetitions: 0.353511
Comparing data array, shapes match: True Model tested: sgc_dstellate, measure: 20% latency args: ['add', 'class', 'contains', 'delattr', 'dir', 'doc', 'eq', 'format', 'ge', 'getattribute', 'getitem', 'getnewargs', 'gt', 'hash', 'init', 'init_subclass', 'iter', 'le', 'len', 'lt', 'mod', 'mul', 'ne', 'new', 'reduce', 'reduce_ex', 'repr', 'rmod', 'rmul', 'setattr', 'sizeof', 'str', 'subclasshook', 'capitalize', 'casefold', 'center', 'count', 'encode', 'endswith', 'expandtabs', 'find', 'format', 'format_map', 'index', 'isalnum', 'isalpha', 'isascii', 'isdecimal', 'isdigit', 'isidentifier', 'islower', 'isnumeric', 'isprintable', 'isspace', 'istitle', 'isupper', 'join', 'ljust', 'lower', 'lstrip', 'maketrans', 'partition', 'replace', 'rfind', 'rindex', 'rjust', 'rpartition', 'rsplit', 'rstrip', 'split', 'splitlines', 'startswith', 'strip', 'swapcase', 'title', 'translate', 'upper', 'zfill'] Array expected: [0.69758345 0.72334678 0.74589235 0.8474736 0.72313864 0.7938418 0.84974859 0.82062624 0.84822158 0.84544384] Array received: [0.69895612 0.72346767 0.74590778 0.84750019 0.72314556 0.79468527 0.84976285 0.82063297 0.84822449 0.84545507] args[0]: sgc args[0] is string: sgc ____ test_dstellatebushy ____ cnmodel/synapses/tests/test_synapses.py:34: in test_dstellate_bushy SynapseTester('dstellate', 'bushy') cnmodel/synapses/tests/testsynapses.py:72: in init UserTester.init(self, "%s%s" % (pre, post), pre, post) cnmodel/util/user_tester.py:35: in init self.assert_test_info(*args, *kwds) cnmodel/synapses/tests/test_synapses.py:108: in assert_test_info super(SynapseTester, self).assert_test_info(args, **kwds) cnmodel/util/user_tester.py:154: in assert_test_info self.compare_results(None, result, expect) cnmodel/util/user_tester.py:67: in compare_results self.compare_results(k, info[k], expect[k]) cnmodel/util/user_tester.py:70: in compare_results self.compare_results(key, info[i], expect[i]) cnmodel/util/user_tester.py:97: in compare_results self.compare_results(k, info[k], expect[k]) cnmodel/util/user_tester.py:94: in compare_results assert np.allclose(info[mask], expect[mask], rtol=self.rtol) E AssertionError ---------------------------------------------------------------------------------------------------- Captured stdout call ----------------------------------------------------------------------------------------------------- Elapsed time for 1 Repetitions: 0.929721
Comparing data array, shapes match: True Model tested: dstellate_bushy, measure: 20% latency args: ['add', 'class', 'contains', 'delattr', 'dir', 'doc', 'eq', 'format', 'ge', 'getattribute', 'getitem', 'getnewargs', 'gt', 'hash', 'init', 'init_subclass', 'iter', 'le', 'len', 'lt', 'mod', 'mul', 'ne', 'new', 'reduce', 'reduce_ex', 'repr', 'rmod', 'rmul', 'setattr', 'sizeof', 'str', 'subclasshook', 'capitalize', 'casefold', 'center', 'count', 'encode', 'endswith', 'expandtabs', 'find', 'format', 'format_map', 'index', 'isalnum', 'isalpha', 'isascii', 'isdecimal', 'isdigit', 'isidentifier', 'islower', 'isnumeric', 'isprintable', 'isspace', 'istitle', 'isupper', 'join', 'ljust', 'lower', 'lstrip', 'maketrans', 'partition', 'replace', 'rfind', 'rindex', 'rjust', 'rpartition', 'rsplit', 'rstrip', 'split', 'splitlines', 'startswith', 'strip', 'swapcase', 'title', 'translate', 'upper', 'zfill'] Array expected: [0.79418947 0.84940772 0.87459424 0.87468865 0.87456684 0.92467369 0.92437739 0.94899433 0.94971789 0.92495172] Array received: [0.76918947 0.82440772 0.84959424 0.84968865 0.84956684 0.89967369 0.89937739 0.92399433 0.92471789 0.89995172] args[0]: dstellate args[0] is string: dstellate __ test_dstellate_tstellate ___ cnmodel/synapses/tests/test_synapses.py:37: in test_dstellate_tstellate SynapseTester('dstellate', 'tstellate') cnmodel/synapses/tests/testsynapses.py:72: in init UserTester.init(self, "%s%s" % (pre, post), pre, post) cnmodel/util/user_tester.py:35: in init self.assert_test_info(*args, *kwds) cnmodel/synapses/tests/test_synapses.py:108: in assert_test_info super(SynapseTester, self).assert_test_info(args, **kwds) cnmodel/util/user_tester.py:154: in assert_test_info self.compare_results(None, result, expect) cnmodel/util/user_tester.py:67: in compare_results self.compare_results(k, info[k], expect[k]) cnmodel/util/user_tester.py:70: in compare_results self.compare_results(key, info[i], expect[i]) cnmodel/util/user_tester.py:97: in compare_results self.compare_results(k, info[k], expect[k]) cnmodel/util/user_tester.py:94: in compare_results assert np.allclose(info[mask], expect[mask], rtol=self.rtol) E AssertionError ---------------------------------------------------------------------------------------------------- Captured stdout call ----------------------------------------------------------------------------------------------------- Elapsed time for 1 Repetitions: 1.164371
Comparing data array, shapes match: True Model tested: dstellate_tstellate, measure: 20% latency args: ['add', 'class', 'contains', 'delattr', 'dir', 'doc', 'eq', 'format', 'ge', 'getattribute', 'getitem', 'getnewargs', 'gt', 'hash', 'init', 'init_subclass', 'iter', 'le', 'len', 'lt', 'mod', 'mul', 'ne', 'new', 'reduce', 'reduce_ex', 'repr', 'rmod', 'rmul', 'setattr', 'sizeof', 'str', 'subclasshook', 'capitalize', 'casefold', 'center', 'count', 'encode', 'endswith', 'expandtabs', 'find', 'format', 'format_map', 'index', 'isalnum', 'isalpha', 'isascii', 'isdecimal', 'isdigit', 'isidentifier', 'islower', 'isnumeric', 'isprintable', 'isspace', 'istitle', 'isupper', 'join', 'ljust', 'lower', 'lstrip', 'maketrans', 'partition', 'replace', 'rfind', 'rindex', 'rjust', 'rpartition', 'rsplit', 'rstrip', 'split', 'splitlines', 'startswith', 'strip', 'swapcase', 'title', 'translate', 'upper', 'zfill'] Array expected: [0.64526165 0.66481897 0.77401916 0.74851229 0.72098648 0.74244124 0.77376867 0.79760721 0.7985437 0.7484276 ] Array received: [0.62026165 0.63981897 0.74901916 0.72351229 0.69598648 0.71744124 0.74876867 0.77260721 0.7735437 0.7234276 ] args[0]: dstellate args[0] is string: dstellate __ test_dstellate_dstellate _ cnmodel/synapses/tests/test_synapses.py:40: in test_dstellate_dstellate SynapseTester('dstellate', 'dstellate') cnmodel/synapses/tests/testsynapses.py:72: in init UserTester.init(self, "%s%s" % (pre, post), pre, post) cnmodel/util/user_tester.py:35: in init self.assert_test_info(*args, *kwds) cnmodel/synapses/tests/test_synapses.py:108: in assert_test_info super(SynapseTester, self).assert_test_info(args, **kwds) cnmodel/util/user_tester.py:154: in assert_test_info self.compare_results(None, result, expect) cnmodel/util/user_tester.py:67: in compare_results self.compare_results(k, info[k], expect[k]) cnmodel/util/user_tester.py:70: in compare_results self.compare_results(key, info[i], expect[i]) cnmodel/util/user_tester.py:97: in compare_results self.compare_results(k, info[k], expect[k]) cnmodel/util/user_tester.py:80: in compare_results assert np.all(inans == enans) E AssertionError ---------------------------------------------------------------------------------------------------- Captured stdout call ----------------------------------------------------------------------------------------------------- Elapsed time for 1 Repetitions: 0.359177 ___ testmatlab ____ cnmodel/util/tests/test_matlab.py:14: in test_matlab proc = matlab.engine.start_matlab() E NameError: name 'matlab' is not defined ====================================================================================================== warnings summary ======================================================================================================= ../venv/python/lib/python3.7/site-packages/scipy/linalg/init.py:212 /home/sabina/Documents/PhD/CNModel/venv/python/lib/python3.7/site-packages/scipy/linalg/init.py:212: DeprecationWarning: The module numpy.dual is deprecated. Instead of using dual, use the functions directly from numpy or scipy. from numpy.dual import register_func
../venv/python/lib/python3.7/site-packages/scipy/special/orthogonal.py:81
../venv/python/lib/python3.7/site-packages/scipy/special/orthogonal.py:81
/home/sabina/Documents/PhD/CNModel/venv/python/lib/python3.7/site-packages/scipy/special/orthogonal.py:81: DeprecationWarning: np.int
is a deprecated alias for the builtin int
. To silence this warning, use int
by itself. Doing this will not modify any behavior and is safe. When replacing np.int
, you may wish to use e.g. np.int64
or np.int32
to specify the precision. If you wish to review your current use, check the release note link for additional information.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
from numpy import (exp, inf, pi, sqrt, floor, sin, cos, around, int,
../venv/python/lib/python3.7/site-packages/scipy/spatial/_spherical_voronoi.py:15 /home/sabina/Documents/PhD/CNModel/venv/python/lib/python3.7/site-packages/scipy/spatial/_spherical_voronoi.py:15: PendingDeprecationWarning: Importing from numpy.matlib is deprecated since 1.19.0. The matrix subclass is not the recommended way to represent matrices or deal with linear algebra (see https://docs.scipy.org/doc/numpy/user/numpy-for-matlab-users.html). Please adjust your code to use regular ndarray. import numpy.matlib
../venv/python/lib/python3.7/site-packages/scipy/io/matlab/mio5.py:98
/home/sabina/Documents/PhD/CNModel/venv/python/lib/python3.7/site-packages/scipy/io/matlab/mio5.py:98: DeprecationWarning: np.bool
is a deprecated alias for the builtin bool
. To silence this warning, use bool
by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.bool_
here.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
from .mio5_utils import VarReader5
../venv/python/lib/python3.7/site-packages/matplotlib/init.py:186 ../venv/python/lib/python3.7/site-packages/matplotlib/init.py:186 /home/sabina/Documents/PhD/CNModel/venv/python/lib/python3.7/site-packages/matplotlib/init.py:186: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. a = distutils.version.LooseVersion(a)
../venv/python/lib/python3.7/site-packages/matplotlib/init.py:187 ../venv/python/lib/python3.7/site-packages/matplotlib/init.py:187 /home/sabina/Documents/PhD/CNModel/venv/python/lib/python3.7/site-packages/matplotlib/init.py:187: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. b = distutils.version.LooseVersion(b)
cnmodel/an_model/tests/test_cache.py::test_cache
/home/sabina/Documents/PhD/CNModel/venv/python/lib/python3.7/site-packages/scipy/signal/_arraytools.py:45: FutureWarning: Using a non-tuple sequence for multidimensional indexing is deprecated; use arr[tuple(seq)]
instead of arr[seq]
. In the future this will be interpreted as an array index, arr[np.array(seq)]
, which will result either in an error or a different result.
b = a[a_slice]
cnmodel/an_model/tests/test_cache.py::test_cache
/home/sabina/Documents/PhD/CNModel/venv/python/lib/python3.7/site-packages/scipy/signal/signaltools.py:1341: FutureWarning: Using a non-tuple sequence for multidimensional indexing is deprecated; use arr[tuple(seq)]
instead of arr[seq]
. In the future this will be interpreted as an array index, arr[np.array(seq)]
, which will result either in an error or a different result.
out_full[ind] += zi
cnmodel/an_model/tests/test_cache.py::test_cache
/home/sabina/Documents/PhD/CNModel/venv/python/lib/python3.7/site-packages/scipy/signal/signaltools.py:1344: FutureWarning: Using a non-tuple sequence for multidimensional indexing is deprecated; use arr[tuple(seq)]
instead of arr[seq]
. In the future this will be interpreted as an array index, arr[np.array(seq)]
, which will result either in an error or a different result.
out = out_full[ind]
cnmodel/an_model/tests/test_cache.py::test_cache
/home/sabina/Documents/PhD/CNModel/venv/python/lib/python3.7/site-packages/scipy/signal/signaltools.py:1350: FutureWarning: Using a non-tuple sequence for multidimensional indexing is deprecated; use arr[tuple(seq)]
instead of arr[seq]
. In the future this will be interpreted as an array index, arr[np.array(seq)]
, which will result either in an error or a different result.
zf = out_full[ind]
cnmodel/cells/tests/test_cells.py: 57743 warnings
/home/sabina/Documents/PhD/CNModel/venv/python/lib/python3.7/site-packages/lmfit/model.py:626: DeprecationWarning: np.complex
is a deprecated alias for the builtin complex
. To silence this warning, use complex
by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.complex128
here.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
if diff.dtype == np.complex:
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =================================================================================================== short test summary info =================================================================================================== FAILED cnmodel/mechanisms/tests/test_mechanisms.py::test_max_open_probability - assert False FAILED cnmodel/synapses/tests/test_synapses.py::test_sgc_bushy - AssertionError FAILED cnmodel/synapses/tests/test_synapses.py::test_sgc_tstellate - AssertionError FAILED cnmodel/synapses/tests/test_synapses.py::test_sgc_tstellate2 - AssertionError FAILED cnmodel/synapses/tests/test_synapses.py::test_sgc_dstellate - AssertionError FAILED cnmodel/synapses/tests/test_synapses.py::test_dstellate_bushy - AssertionError FAILED cnmodel/synapses/tests/test_synapses.py::test_dstellate_tstellate - AssertionError FAILED cnmodel/synapses/tests/test_synapses.py::test_dstellate_dstellate - AssertionError FAILED cnmodel/util/tests/test_matlab.py::test_matlab - NameError: name 'matlab' is not defined
Hi Sabina,
That is progress!
You do not need to do the matlab connection (I haven’t used it in a couple of years), as the “cochlea” python wrapper works fine and gives the same output. It appears that all of the test failures are in the 4th decimal place for the synapse tests, but perhaps larger in the latency tests (comparing array expected with array received). To use it for development would be fine, but it would be nicer if it passed the tests. On my systems (macs, with both intel and apple silicon hardware), all tests pass. I just set up and ran on a Linux system (ubuntu, a little older than yours) and get the same kind of error, but not the exact numbers. I suspect there is something with the random number generation, but will have to track it down.
Also, test_matlab gives a yellow warning: “SKIPPED (MATLAB Unavailable”). Normally not having matlab should produce only this warning, so the error you have suggests to me that maybe this isn’t the latest version of cnmodel.
You might want to pull from my personal repository (github.com/pbmanis/cnmodel python3 branch) and try again. It has several updates that are not in the “public” repo at this point, including using pyqt6 instead of pyqt5. That was required to make it run on Apple silicon.
I’ve been hesitant to push new versions to the public repo, but I looks like I should coordinate with Luke and make an updated release soon.
Let me know if this helps!
--Paul
On 2/9/23, 11:31 AM, "ReallyCoolBean" @.***> wrote:
Dear Paul,
Thank you for your prompt reply! I installed the latest version of cochlea package from PyPi, not from GitHub, so maybe I have not the most up-to-date version. Anyway, I followed your advice and commented out the if statement that was causing the error (line 120 and 121 in file cochlea/zilany2014/init.py). The attribute error disappeared, but I still have many assertion errors from other tests. I copied the output from running test.py below. I also have an error from test_matlab.py and I realised it is because I do not have matlabengine package. I wanted to install it, but it was not possible in my environment. As I have MatLab2022b, I need one of the newer versions of matalabengine, that are not compatible with Python 3.7. My system Python is actually 3.10, so not a problem for me to get a new virtual environment with Python 3.10 if, as you mentioned, CNmodel works with 3.10 as well. I only got Python 3.7, because it was one of the requirements mentioned in the documentation. But is MatLab necessary to run models with CNmodel? I understood from the documentation, that it is optional to use MatLab, as one can use cochlea Python package to simulate AN inputs, instead of using Matlab-based model from Zilany. Or am I wrong? Many thanks for your help so far!
Best wishes, Sabina Nowakowska
Testing with flags: -v --tb=short cnmodel/ --ignore=cnmodel/an_model/cache/ ===================================================================================================== test session starts ===================================================================================================== platform linux -- Python 3.7.16, pytest-7.2.1, pluggy-1.0.0 -- /home/sabina/Documents/PhD/CNModel/venv/python/bin/python cachedir: .pytest_cache rootdir: /home/sabina/Documents/PhD/CNModel/cnmodel collected 38 items
cnmodel/an_model/tests/test_cache.py::test_cache PASSED [ 2%] cnmodel/an_model/tests/test_cache.py::test_parallel PASSED [ 5%] cnmodel/cells/tests/test_cells.py::test_bushy PASSED [ 7%] cnmodel/cells/tests/test_cells.py::test_bushy21 PASSED [ 10%] cnmodel/cells/tests/test_cells.py::test_bushy_mouse PASSED [ 13%] cnmodel/cells/tests/test_cells.py::test_tstellate PASSED [ 15%] cnmodel/cells/tests/test_cells.py::test_tstellate_mouse PASSED [ 18%] cnmodel/cells/tests/test_cells.py::test_tstellatet PASSED [ 21%] cnmodel/cells/tests/test_cells.py::test_dstellate PASSED [ 23%] cnmodel/cells/tests/test_cells.py::test_dstellate_mouse PASSED [ 26%] cnmodel/cells/tests/test_cells.py::test_octopus PASSED [ 28%] cnmodel/cells/tests/test_cells.py::test_pyramidal PASSED [ 31%] cnmodel/cells/tests/test_cells.py::test_pyramidal_ceballos PASSED [ 34%] cnmodel/cells/tests/test_cells.py::test_tuberculoventral PASSED [ 36%] cnmodel/cells/tests/test_cells.py::test_cartwheel PASSED [ 39%] cnmodel/cells/tests/test_cells.py::test_sgc_basal_middle PASSED [ 42%] cnmodel/cells/tests/test_cells.py::test_sgc_apical PASSED [ 44%] cnmodel/cells/tests/test_cells.py::test_mso PASSED [ 47%] cnmodel/data/tests/test_db.py::test_db PASSED [ 50%] cnmodel/mechanisms/tests/test_mechanisms.py::test_max_open_probability FAILED [ 52%] cnmodel/synapses/tests/test_psd.py::test_sgc_bushy_psd PASSED [ 55%] cnmodel/synapses/tests/test_psd.py::test_sgc_tstellate_psd PASSED [ 57%] cnmodel/synapses/tests/test_psd.py::test_sgc_dstellate_psd PASSED [ 60%] cnmodel/synapses/tests/test_psd.py::test_sgc_octopus_psd PASSED [ 63%] cnmodel/synapses/tests/test_synapses.py::test_sgc_bushy FAILED [ 65%] cnmodel/synapses/tests/test_synapses.py::test_sgc_tstellate FAILED [ 68%] cnmodel/synapses/tests/test_synapses.py::test_sgc_tstellate2 FAILED [ 71%] cnmodel/synapses/tests/test_synapses.py::test_sgc_dstellate FAILED [ 73%] cnmodel/synapses/tests/test_synapses.py::test_dstellate_bushy FAILED [ 76%] cnmodel/synapses/tests/test_synapses.py::test_dstellate_tstellate FAILED [ 78%] cnmodel/synapses/tests/test_synapses.py::test_dstellate_dstellate FAILED [ 81%] cnmodel/util/tests/test_expfitting.py::test_fit1 PASSED [ 84%] cnmodel/util/tests/test_expfitting.py::test_fit2 PASSED [ 86%] cnmodel/util/tests/test_matlab.py::test_matlab FAILED [ 89%] cnmodel/util/tests/test_sound.py::test_conversions PASSED [ 92%] cnmodel/util/tests/test_sound.py::test_tonepip PASSED [ 94%] cnmodel/util/tests/test_sound.py::test_noisepip PASSED [ 97%] cnmodel/util/tests/test_stim.py::test_make_pulse PASSED [100%]
========================================================================================================== FAILURES =========================================================================================================== __ test_max_open_probability __ cnmodel/mechanisms/tests/test_mechanisms.py:36: in test_max_open_probability assert np.allclose(max(op[1]), npsd.MaxOpen) E assert False E + where False = <function allclose at 0x7f218a2be290>(4.461976908971173e-16, 0.0198889) E + where <function allclose at 0x7f218a2be290> = np.allclose E + and 4.461976908971173e-16 = max([0.0, 1.6665747465704637e-22, 4.27921634125633e-22, 4.0857545073757307e-22, 7.283389826508939e-22, 4.368899757669638e-17, ...]) E + and 0.0198889 = NMDA_Kampa[0].MaxOpen ___ test_sgc_bushy ____ cnmodel/synapses/tests/test_synapses.py:22: in test_sgc_bushy SynapseTester('sgc', 'bushy') cnmodel/synapses/tests/testsynapses.py:72: in init UserTester.init(self, "%s%s" % (pre, post), pre, post) cnmodel/util/user_tester.py:35: in init self.assert_test_info(*args, *kwds) cnmodel/synapses/tests/test_synapses.py:108: in assert_test_info super(SynapseTester, self).assert_test_info(args, **kwds) cnmodel/util/user_tester.py:154: in assert_test_info self.compare_results(None, result, expect) cnmodel/util/user_tester.py:67: in compare_results self.compare_results(k, info[k], expect[k]) cnmodel/util/user_tester.py:70: in compare_results self.compare_results(key, info[i], expect[i]) cnmodel/util/user_tester.py:97: in compare_results self.compare_results(k, info[k], expect[k]) cnmodel/util/user_tester.py:94: in compare_results assert np.allclose(info[mask], expect[mask], rtol=self.rtol) E AssertionError ---------------------------------------------------------------------------------------------------- Captured stdout call ----------------------------------------------------------------------------------------------------- Elapsed time for 1 Repetitions: 6.867311
Comparing data array, shapes match: True Model tested: sgc_bushy, measure: rise time args: ['add', 'class', 'contains', 'delattr', 'dir', 'doc', 'eq', 'format', 'ge', 'getattribute', 'getitem', 'getnewargs', 'gt', 'hash', 'init', 'init_subclass', 'iter', 'le', 'len', 'lt', 'mod', 'mul', 'ne', 'new', 'reduce', 'reduce_ex', 'repr', 'rmod', 'rmul', 'setattr', 'sizeof', 'str', 'subclasshook', 'capitalize', 'casefold', 'center', 'count', 'encode', 'endswith', 'expandtabs', 'find', 'format', 'formatmap', 'index', 'isalnum', 'isalpha', 'isascii', 'isdecimal', 'isdigit', 'isidentifier', 'islower', 'isnumeric', 'isprintable', 'isspace', 'istitle', 'isupper', 'join', 'ljust', 'lower', 'lstrip', 'maketrans', 'partition', 'replace', 'rfind', 'rindex', 'rjust', 'rpartition', 'rsplit', 'rstrip', 'split', 'splitlines', 'startswith', 'strip', 'swapcase', 'title', 'translate', 'upper', 'zfill'] Array expected: [0.13030221 0.12689413 0.15776253 0.12518961 0.15403892 0.15031173 0.14999838 0.14959451 0.15207041 0.14871827] Array received: [0.12990024 0.12679544 0.15763125 0.12513097 0.15396506 0.15028471 0.1500004 0.14958562 0.15204367 0.14869695] args[0]: sgc args[0] is string: sgc ____ test_sgc_tstellate __ cnmodel/synapses/tests/test_synapses.py:25: in test_sgc_tstellate SynapseTester('sgc', 'tstellate') cnmodel/synapses/tests/testsynapses.py:72: in init UserTester.init(self, "%s%s" % (pre, post), pre, post) cnmodel/util/user_tester.py:35: in init self.assert_test_info(*args, *kwds) cnmodel/synapses/tests/test_synapses.py:108: in assert_test_info super(SynapseTester, self).assert_test_info(args, **kwds) cnmodel/util/user_tester.py:154: in assert_test_info self.compare_results(None, result, expect) cnmodel/util/user_tester.py:67: in compare_results self.compare_results(k, info[k], expect[k]) cnmodel/util/user_tester.py:70: in compare_results self.compare_results(key, info[i], expect[i]) cnmodel/util/user_tester.py:97: in compare_results self.compare_results(k, info[k], expect[k]) cnmodel/util/user_tester.py:94: in compare_results assert np.allclose(info[mask], expect[mask], rtol=self.rtol) E AssertionError ---------------------------------------------------------------------------------------------------- Captured stdout call ----------------------------------------------------------------------------------------------------- Elapsed time for 1 Repetitions: 0.689052
Comparing data array, shapes match: True Model tested: sgc_tstellate, measure: 20% latency args: ['add', 'class', 'contains', 'delattr', 'dir', 'doc', 'eq', 'format', 'ge', 'getattribute', 'getitem', 'getnewargs', 'gt', 'hash', 'init', 'init_subclass', 'iter', 'le', 'len', 'lt', 'mod', 'mul', 'ne', 'new', 'reduce', 'reduce_ex', 'repr', 'rmod', 'rmul', 'setattr', 'sizeof', 'str', 'subclasshook', 'capitalize', 'casefold', 'center', 'count', 'encode', 'endswith', 'expandtabs', 'find', 'format', 'formatmap', 'index', 'isalnum', 'isalpha', 'isascii', 'isdecimal', 'isdigit', 'isidentifier', 'islower', 'isnumeric', 'isprintable', 'isspace', 'istitle', 'isupper', 'join', 'ljust', 'lower', 'lstrip', 'maketrans', 'partition', 'replace', 'rfind', 'rindex', 'rjust', 'rpartition', 'rsplit', 'rstrip', 'split', 'splitlines', 'startswith', 'strip', 'swapcase', 'title', 'translate', 'upper', 'zfill'] Array expected: [0.69308864 0.79556712 0.74559008 0.77344193 0.77430411 0.82386196 0.74595242 0.8241403 0.77463667 0.7999326 ] Array received: [0.69434415 0.79589992 0.74570349 0.77357376 0.77429169 0.82386061 0.74596277 0.8242256 0.77464264 0.79993472] args[0]: sgc args[0] is string: sgc ____ test_sgctstellate2 ____ cnmodel/synapses/tests/test_synapses.py:28: in test_sgc_tstellate2 SynapseTester('sgc', 'tstellate') cnmodel/synapses/tests/testsynapses.py:72: in init UserTester.init(self, "%s%s" % (pre, post), pre, post) cnmodel/util/user_tester.py:35: in init self.assert_test_info(*args, *kwds) cnmodel/synapses/tests/test_synapses.py:108: in assert_test_info super(SynapseTester, self).assert_test_info(args, **kwds) cnmodel/util/user_tester.py:154: in assert_test_info self.compare_results(None, result, expect) cnmodel/util/user_tester.py:67: in compare_results self.compare_results(k, info[k], expect[k]) cnmodel/util/user_tester.py:70: in compare_results self.compare_results(key, info[i], expect[i]) cnmodel/util/user_tester.py:97: in compare_results self.compare_results(k, info[k], expect[k]) cnmodel/util/user_tester.py:94: in compare_results assert np.allclose(info[mask], expect[mask], rtol=self.rtol) E AssertionError ---------------------------------------------------------------------------------------------------- Captured stdout call ----------------------------------------------------------------------------------------------------- Elapsed time for 1 Repetitions: 0.673543
Comparing data array, shapes match: True Model tested: sgc_tstellate, measure: 20% latency args: ['add', 'class', 'contains', 'delattr', 'dir', 'doc', 'eq', 'format', 'ge', 'getattribute', 'getitem', 'getnewargs', 'gt', 'hash', 'init', 'init_subclass', 'iter', 'le', 'len', 'lt', 'mod', 'mul', 'ne', 'new', 'reduce', 'reduce_ex', 'repr', 'rmod', 'rmul', 'setattr', 'sizeof', 'str', 'subclasshook', 'capitalize', 'casefold', 'center', 'count', 'encode', 'endswith', 'expandtabs', 'find', 'format', 'formatmap', 'index', 'isalnum', 'isalpha', 'isascii', 'isdecimal', 'isdigit', 'isidentifier', 'islower', 'isnumeric', 'isprintable', 'isspace', 'istitle', 'isupper', 'join', 'ljust', 'lower', 'lstrip', 'maketrans', 'partition', 'replace', 'rfind', 'rindex', 'rjust', 'rpartition', 'rsplit', 'rstrip', 'split', 'splitlines', 'startswith', 'strip', 'swapcase', 'title', 'translate', 'upper', 'zfill'] Array expected: [0.69308864 0.79556712 0.74559008 0.77344193 0.77430411 0.82386196 0.74595242 0.8241403 0.77463667 0.7999326 ] Array received: [0.69434415 0.79589992 0.74570349 0.77357376 0.77429169 0.82386061 0.74596277 0.8242256 0.77464264 0.79993472] args[0]: sgc args[0] is string: sgc ____ test_sgc_dstellate __ cnmodel/synapses/tests/test_synapses.py:31: in test_sgc_dstellate SynapseTester('sgc', 'dstellate') cnmodel/synapses/tests/testsynapses.py:72: in init UserTester.init(self, "%s%s" % (pre, post), pre, post) cnmodel/util/user_tester.py:35: in init self.assert_test_info(*args, *kwds) cnmodel/synapses/tests/test_synapses.py:108: in assert_test_info super(SynapseTester, self).assert_test_info(args, **kwds) cnmodel/util/user_tester.py:154: in assert_test_info self.compare_results(None, result, expect) cnmodel/util/user_tester.py:67: in compare_results self.compare_results(k, info[k], expect[k]) cnmodel/util/user_tester.py:70: in compare_results self.compare_results(key, info[i], expect[i]) cnmodel/util/user_tester.py:97: in compare_results self.compare_results(k, info[k], expect[k]) cnmodel/util/user_tester.py:94: in compare_results assert np.allclose(info[mask], expect[mask], rtol=self.rtol) E AssertionError ---------------------------------------------------------------------------------------------------- Captured stdout call ----------------------------------------------------------------------------------------------------- Elapsed time for 1 Repetitions: 0.378907
Comparing data array, shapes match: True Model tested: sgc_dstellate, measure: 20% latency args: ['add', 'class', 'contains', 'delattr', 'dir', 'doc', 'eq', 'format', 'ge', 'getattribute', 'getitem', 'getnewargs', 'gt', 'hash', 'init', 'init_subclass', 'iter', 'le', 'len', 'lt', 'mod', 'mul', 'ne', 'new', 'reduce', 'reduce_ex', 'repr', 'rmod', 'rmul', 'setattr', 'sizeof', 'str', 'subclasshook', 'capitalize', 'casefold', 'center', 'count', 'encode', 'endswith', 'expandtabs', 'find', 'format', 'format_map', 'index', 'isalnum', 'isalpha', 'isascii', 'isdecimal', 'isdigit', 'isidentifier', 'islower', 'isnumeric', 'isprintable', 'isspace', 'istitle', 'isupper', 'join', 'ljust', 'lower', 'lstrip', 'maketrans', 'partition', 'replace', 'rfind', 'rindex', 'rjust', 'rpartition', 'rsplit', 'rstrip', 'split', 'splitlines', 'startswith', 'strip', 'swapcase', 'title', 'translate', 'upper', 'zfill'] Array expected: [0.69758345 0.72334678 0.74589235 0.8474736 0.72313864 0.7938418 0.84974859 0.82062624 0.84822158 0.84544384] Array received: [0.69895612 0.72346767 0.74590778 0.84750019 0.72314556 0.79468527 0.84976285 0.82063297 0.84822449 0.84545507] args[0]: sgc args[0] is string: sgc ____ test_dstellatebushy ____ cnmodel/synapses/tests/test_synapses.py:34: in test_dstellate_bushy SynapseTester('dstellate', 'bushy') cnmodel/synapses/tests/testsynapses.py:72: in init UserTester.init(self, "%s%s" % (pre, post), pre, post) cnmodel/util/user_tester.py:35: in init self.assert_test_info(*args, *kwds) cnmodel/synapses/tests/test_synapses.py:108: in assert_test_info super(SynapseTester, self).assert_test_info(args, **kwds) cnmodel/util/user_tester.py:154: in assert_test_info self.compare_results(None, result, expect) cnmodel/util/user_tester.py:67: in compare_results self.compare_results(k, info[k], expect[k]) cnmodel/util/user_tester.py:70: in compare_results self.compare_results(key, info[i], expect[i]) cnmodel/util/user_tester.py:97: in compare_results self.compare_results(k, info[k], expect[k]) cnmodel/util/user_tester.py:94: in compare_results assert np.allclose(info[mask], expect[mask], rtol=self.rtol) E AssertionError ---------------------------------------------------------------------------------------------------- Captured stdout call ----------------------------------------------------------------------------------------------------- Elapsed time for 1 Repetitions: 0.954070
Comparing data array, shapes match: True Model tested: dstellate_bushy, measure: 20% latency args: ['add', 'class', 'contains', 'delattr', 'dir', 'doc', 'eq', 'format', 'ge', 'getattribute', 'getitem', 'getnewargs', 'gt', 'hash', 'init', 'init_subclass', 'iter', 'le', 'len', 'lt', 'mod', 'mul', 'ne', 'new', 'reduce', 'reduce_ex', 'repr', 'rmod', 'rmul', 'setattr', 'sizeof', 'str', 'subclasshook', 'capitalize', 'casefold', 'center', 'count', 'encode', 'endswith', 'expandtabs', 'find', 'format', 'format_map', 'index', 'isalnum', 'isalpha', 'isascii', 'isdecimal', 'isdigit', 'isidentifier', 'islower', 'isnumeric', 'isprintable', 'isspace', 'istitle', 'isupper', 'join', 'ljust', 'lower', 'lstrip', 'maketrans', 'partition', 'replace', 'rfind', 'rindex', 'rjust', 'rpartition', 'rsplit', 'rstrip', 'split', 'splitlines', 'startswith', 'strip', 'swapcase', 'title', 'translate', 'upper', 'zfill'] Array expected: [0.79418947 0.84940772 0.87459424 0.87468865 0.87456684 0.92467369 0.92437739 0.94899433 0.94971789 0.92495172] Array received: [0.76918947 0.82440772 0.84959424 0.84968865 0.84956684 0.89967369 0.89937739 0.92399433 0.92471789 0.89995172] args[0]: dstellate args[0] is string: dstellate __ test_dstellate_tstellate ___ cnmodel/synapses/tests/test_synapses.py:37: in test_dstellate_tstellate SynapseTester('dstellate', 'tstellate') cnmodel/synapses/tests/testsynapses.py:72: in init UserTester.init(self, "%s%s" % (pre, post), pre, post) cnmodel/util/user_tester.py:35: in init self.assert_test_info(*args, *kwds) cnmodel/synapses/tests/test_synapses.py:108: in assert_test_info super(SynapseTester, self).assert_test_info(args, **kwds) cnmodel/util/user_tester.py:154: in assert_test_info self.compare_results(None, result, expect) cnmodel/util/user_tester.py:67: in compare_results self.compare_results(k, info[k], expect[k]) cnmodel/util/user_tester.py:70: in compare_results self.compare_results(key, info[i], expect[i]) cnmodel/util/user_tester.py:97: in compare_results self.compare_results(k, info[k], expect[k]) cnmodel/util/user_tester.py:94: in compare_results assert np.allclose(info[mask], expect[mask], rtol=self.rtol) E AssertionError ---------------------------------------------------------------------------------------------------- Captured stdout call ----------------------------------------------------------------------------------------------------- Elapsed time for 1 Repetitions: 0.753272
Comparing data array, shapes match: True Model tested: dstellate_tstellate, measure: 20% latency args: ['add', 'class', 'contains', 'delattr', 'dir', 'doc', 'eq', 'format', 'ge', 'getattribute', 'getitem', 'getnewargs', 'gt', 'hash', 'init', 'init_subclass', 'iter', 'le', 'len', 'lt', 'mod', 'mul', 'ne', 'new', 'reduce', 'reduce_ex', 'repr', 'rmod', 'rmul', 'setattr', 'sizeof', 'str', 'subclasshook', 'capitalize', 'casefold', 'center', 'count', 'encode', 'endswith', 'expandtabs', 'find', 'format', 'format_map', 'index', 'isalnum', 'isalpha', 'isascii', 'isdecimal', 'isdigit', 'isidentifier', 'islower', 'isnumeric', 'isprintable', 'isspace', 'istitle', 'isupper', 'join', 'ljust', 'lower', 'lstrip', 'maketrans', 'partition', 'replace', 'rfind', 'rindex', 'rjust', 'rpartition', 'rsplit', 'rstrip', 'split', 'splitlines', 'startswith', 'strip', 'swapcase', 'title', 'translate', 'upper', 'zfill'] Array expected: [0.64526165 0.66481897 0.77401916 0.74851229 0.72098648 0.74244124 0.77376867 0.79760721 0.7985437 0.7484276 ] Array received: [0.62026165 0.63981897 0.74901916 0.72351229 0.69598648 0.71744124 0.74876867 0.77260721 0.7735437 0.7234276 ] args[0]: dstellate args[0] is string: dstellate __ test_dstellate_dstellate _ cnmodel/synapses/tests/test_synapses.py:40: in test_dstellate_dstellate SynapseTester('dstellate', 'dstellate') cnmodel/synapses/tests/testsynapses.py:72: in init UserTester.init(self, "%s%s" % (pre, post), pre, post) cnmodel/util/user_tester.py:35: in init self.assert_test_info(*args, *kwds) cnmodel/synapses/tests/test_synapses.py:108: in assert_test_info super(SynapseTester, self).assert_test_info(args, **kwds) cnmodel/util/user_tester.py:154: in assert_test_info self.compare_results(None, result, expect) cnmodel/util/user_tester.py:67: in compare_results self.compare_results(k, info[k], expect[k]) cnmodel/util/user_tester.py:70: in compare_results self.compare_results(key, info[i], expect[i]) cnmodel/util/user_tester.py:97: in compare_results self.compare_results(k, info[k], expect[k]) cnmodel/util/user_tester.py:80: in compare_results assert np.all(inans == enans) E AssertionError ---------------------------------------------------------------------------------------------------- Captured stdout call ----------------------------------------------------------------------------------------------------- Elapsed time for 1 Repetitions: 0.312217 ___ testmatlab ____ cnmodel/util/tests/test_matlab.py:14: in test_matlab proc = matlab.engine.start_matlab() E NameError: name 'matlab' is not defined ====================================================================================================== warnings summary ======================================================================================================= ../venv/python/lib/python3.7/site-packages/scipy/linalg/init.py:212 /home/sabina/Documents/PhD/CNModel/venv/python/lib/python3.7/site-packages/scipy/linalg/init.py:212: DeprecationWarning: The module numpy.dual is deprecated. Instead of using dual, use the functions directly from numpy or scipy. from numpy.dual import register_func
../venv/python/lib/python3.7/site-packages/scipy/special/orthogonal.py:81 ../venv/python/lib/python3.7/site-packages/scipy/special/orthogonal.py:81 /home/sabina/Documents/PhD/CNModel/venv/python/lib/python3.7/site-packages/scipy/special/orthogonal.py:81: DeprecationWarning: np.int is a deprecated alias for the builtin int. To silence this warning, use int by itself. Doing this will not modify any behavior and is safe. When replacing np.int, you may wish to use e.g. np.int64 or np.int32 to specify the precision. If you wish to review your current use, check the release note link for additional information. Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations from numpy import (exp, inf, pi, sqrt, floor, sin, cos, around, int,
../venv/python/lib/python3.7/site-packages/scipy/spatial/_spherical_voronoi.py:15 /home/sabina/Documents/PhD/CNModel/venv/python/lib/python3.7/site-packages/scipy/spatial/_spherical_voronoi.py:15: PendingDeprecationWarning: Importing from numpy.matlib is deprecated since 1.19.0. The matrix subclass is not the recommended way to represent matrices or deal with linear algebra (see https://docs.scipy.org/doc/numpy/user/numpy-for-matlab-users.html). Please adjust your code to use regular ndarray. import numpy.matlib
../venv/python/lib/python3.7/site-packages/scipy/io/matlab/mio5.py:98 /home/sabina/Documents/PhD/CNModel/venv/python/lib/python3.7/site-packages/scipy/io/matlab/mio5.py:98: DeprecationWarning: np.bool is a deprecated alias for the builtin bool. To silence this warning, use bool by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.bool_ here. Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations from .mio5_utils import VarReader5
../venv/python/lib/python3.7/site-packages/matplotlib/init.py:186 ../venv/python/lib/python3.7/site-packages/matplotlib/init.py:186 /home/sabina/Documents/PhD/CNModel/venv/python/lib/python3.7/site-packages/matplotlib/init.py:186: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. a = distutils.version.LooseVersion(a)
../venv/python/lib/python3.7/site-packages/matplotlib/init.py:187 ../venv/python/lib/python3.7/site-packages/matplotlib/init.py:187 /home/sabina/Documents/PhD/CNModel/venv/python/lib/python3.7/site-packages/matplotlib/init.py:187: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. b = distutils.version.LooseVersion(b)
cnmodel/an_model/tests/test_cache.py::test_cache /home/sabina/Documents/PhD/CNModel/venv/python/lib/python3.7/site-packages/scipy/signal/_arraytools.py:45: FutureWarning: Using a non-tuple sequence for multidimensional indexing is deprecated; use arr[tuple(seq)] instead of arr[seq]. In the future this will be interpreted as an array index, arr[np.array(seq)], which will result either in an error or a different result. b = a[a_slice]
cnmodel/an_model/tests/test_cache.py::test_cache /home/sabina/Documents/PhD/CNModel/venv/python/lib/python3.7/site-packages/scipy/signal/signaltools.py:1341: FutureWarning: Using a non-tuple sequence for multidimensional indexing is deprecated; use arr[tuple(seq)] instead of arr[seq]. In the future this will be interpreted as an array index, arr[np.array(seq)], which will result either in an error or a different result. out_full[ind] += zi
cnmodel/an_model/tests/test_cache.py::test_cache /home/sabina/Documents/PhD/CNModel/venv/python/lib/python3.7/site-packages/scipy/signal/signaltools.py:1344: FutureWarning: Using a non-tuple sequence for multidimensional indexing is deprecated; use arr[tuple(seq)] instead of arr[seq]. In the future this will be interpreted as an array index, arr[np.array(seq)], which will result either in an error or a different result. out = out_full[ind]
cnmodel/an_model/tests/test_cache.py::test_cache /home/sabina/Documents/PhD/CNModel/venv/python/lib/python3.7/site-packages/scipy/signal/signaltools.py:1350: FutureWarning: Using a non-tuple sequence for multidimensional indexing is deprecated; use arr[tuple(seq)] instead of arr[seq]. In the future this will be interpreted as an array index, arr[np.array(seq)], which will result either in an error or a different result. zf = out_full[ind]
cnmodel/cells/tests/test_cells.py: 57743 warnings /home/sabina/Documents/PhD/CNModel/venv/python/lib/python3.7/site-packages/lmfit/model.py:626: DeprecationWarning: np.complex is a deprecated alias for the builtin complex. To silence this warning, use complex by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.complex128 here. Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations if diff.dtype == np.complex:
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =================================================================================================== short test summary info =================================================================================================== FAILED cnmodel/mechanisms/tests/test_mechanisms.py::test_max_open_probability - assert False FAILED cnmodel/synapses/tests/test_synapses.py::test_sgc_bushy - AssertionError FAILED cnmodel/synapses/tests/test_synapses.py::test_sgc_tstellate - AssertionError FAILED cnmodel/synapses/tests/test_synapses.py::test_sgc_tstellate2 - AssertionError FAILED cnmodel/synapses/tests/test_synapses.py::test_sgc_dstellate - AssertionError FAILED cnmodel/synapses/tests/test_synapses.py::test_dstellate_bushy - AssertionError FAILED cnmodel/synapses/tests/test_synapses.py::test_dstellate_tstellate - AssertionError FAILED cnmodel/synapses/tests/test_synapses.py::test_dstellate_dstellate - AssertionError FAILED cnmodel/util/tests/test_matlab.py::test_matlab - NameError: name 'matlab' is not defined =================================================================================== 9 failed, 29 passed, 57756 warnings in 88.95s (0:01:28) =================================================================================== (python) @.***:~/Documents/PhD/CNModel/cnmodel$ python test.py Testing with flags: -v --tb=short cnmodel/ --ignore=cnmodel/an_model/cache/ ===================================================================================================== test session starts ===================================================================================================== platform linux -- Python 3.7.16, pytest-7.2.1, pluggy-1.0.0 -- /home/sabina/Documents/PhD/CNModel/venv/python/bin/python cachedir: .pytest_cache rootdir: /home/sabina/Documents/PhD/CNModel/cnmodel collected 38 items
cnmodel/an_model/tests/test_cache.py::test_cache PASSED [ 2%] cnmodel/an_model/tests/test_cache.py::test_parallel PASSED [ 5%] cnmodel/cells/tests/test_cells.py::test_bushy PASSED [ 7%] cnmodel/cells/tests/test_cells.py::test_bushy21 PASSED [ 10%] cnmodel/cells/tests/test_cells.py::test_bushy_mouse PASSED [ 13%] cnmodel/cells/tests/test_cells.py::test_tstellate PASSED [ 15%] cnmodel/cells/tests/test_cells.py::test_tstellate_mouse PASSED [ 18%] cnmodel/cells/tests/test_cells.py::test_tstellatet PASSED [ 21%] cnmodel/cells/tests/test_cells.py::test_dstellate PASSED [ 23%] cnmodel/cells/tests/test_cells.py::test_dstellate_mouse PASSED [ 26%] cnmodel/cells/tests/test_cells.py::test_octopus PASSED [ 28%] cnmodel/cells/tests/test_cells.py::test_pyramidal PASSED [ 31%] cnmodel/cells/tests/test_cells.py::test_pyramidal_ceballos PASSED [ 34%] cnmodel/cells/tests/test_cells.py::test_tuberculoventral PASSED [ 36%] cnmodel/cells/tests/test_cells.py::test_cartwheel PASSED [ 39%] cnmodel/cells/tests/test_cells.py::test_sgc_basal_middle PASSED [ 42%] cnmodel/cells/tests/test_cells.py::test_sgc_apical PASSED [ 44%] cnmodel/cells/tests/test_cells.py::test_mso PASSED [ 47%] cnmodel/data/tests/test_db.py::test_db PASSED [ 50%] cnmodel/mechanisms/tests/test_mechanisms.py::test_max_open_probability FAILED [ 52%] cnmodel/synapses/tests/test_psd.py::test_sgc_bushy_psd PASSED [ 55%] cnmodel/synapses/tests/test_psd.py::test_sgc_tstellate_psd PASSED [ 57%] cnmodel/synapses/tests/test_psd.py::test_sgc_dstellate_psd PASSED [ 60%] cnmodel/synapses/tests/test_psd.py::test_sgc_octopus_psd PASSED [ 63%] cnmodel/synapses/tests/test_synapses.py::test_sgc_bushy FAILED [ 65%] cnmodel/synapses/tests/test_synapses.py::test_sgc_tstellate FAILED [ 68%] cnmodel/synapses/tests/test_synapses.py::test_sgc_tstellate2 FAILED [ 71%] cnmodel/synapses/tests/test_synapses.py::test_sgc_dstellate FAILED [ 73%] cnmodel/synapses/tests/test_synapses.py::test_dstellate_bushy FAILED [ 76%] cnmodel/synapses/tests/test_synapses.py::test_dstellate_tstellate FAILED [ 78%] cnmodel/synapses/tests/test_synapses.py::test_dstellate_dstellate FAILED [ 81%] cnmodel/util/tests/test_expfitting.py::test_fit1 PASSED [ 84%] cnmodel/util/tests/test_expfitting.py::test_fit2 PASSED [ 86%] cnmodel/util/tests/test_matlab.py::test_matlab FAILED [ 89%] cnmodel/util/tests/test_sound.py::test_conversions PASSED [ 92%] cnmodel/util/tests/test_sound.py::test_tonepip PASSED [ 94%] cnmodel/util/tests/test_sound.py::test_noisepip PASSED [ 97%] cnmodel/util/tests/test_stim.py::test_make_pulse PASSED [100%]
========================================================================================================== FAILURES =========================================================================================================== __ test_max_open_probability __ cnmodel/mechanisms/tests/test_mechanisms.py:36: in test_max_open_probability assert np.allclose(max(op[1]), npsd.MaxOpen) E assert False E + where False = <function allclose at 0x7fd87f456290>(4.461976908971173e-16, 0.0198889) E + where <function allclose at 0x7fd87f456290> = np.allclose E + and 4.461976908971173e-16 = max([0.0, 1.6665747465704637e-22, 4.27921634125633e-22, 4.0857545073757307e-22, 7.283389826508939e-22, 4.368899757669638e-17, ...]) E + and 0.0198889 = NMDA_Kampa[0].MaxOpen ___ test_sgc_bushy ____ cnmodel/synapses/tests/test_synapses.py:22: in test_sgc_bushy SynapseTester('sgc', 'bushy') cnmodel/synapses/tests/testsynapses.py:72: in init UserTester.init(self, "%s%s" % (pre, post), pre, post) cnmodel/util/user_tester.py:35: in init self.assert_test_info(*args, *kwds) cnmodel/synapses/tests/test_synapses.py:108: in assert_test_info super(SynapseTester, self).assert_test_info(args, **kwds) cnmodel/util/user_tester.py:154: in assert_test_info self.compare_results(None, result, expect) cnmodel/util/user_tester.py:67: in compare_results self.compare_results(k, info[k], expect[k]) cnmodel/util/user_tester.py:70: in compare_results self.compare_results(key, info[i], expect[i]) cnmodel/util/user_tester.py:97: in compare_results self.compare_results(k, info[k], expect[k]) cnmodel/util/user_tester.py:94: in compare_results assert np.allclose(info[mask], expect[mask], rtol=self.rtol) E AssertionError ---------------------------------------------------------------------------------------------------- Captured stdout call ----------------------------------------------------------------------------------------------------- Elapsed time for 1 Repetitions: 7.337993
Comparing data array, shapes match: True Model tested: sgc_bushy, measure: rise time args: ['add', 'class', 'contains', 'delattr', 'dir', 'doc', 'eq', 'format', 'ge', 'getattribute', 'getitem', 'getnewargs', 'gt', 'hash', 'init', 'init_subclass', 'iter', 'le', 'len', 'lt', 'mod', 'mul', 'ne', 'new', 'reduce', 'reduce_ex', 'repr', 'rmod', 'rmul', 'setattr', 'sizeof', 'str', 'subclasshook', 'capitalize', 'casefold', 'center', 'count', 'encode', 'endswith', 'expandtabs', 'find', 'format', 'formatmap', 'index', 'isalnum', 'isalpha', 'isascii', 'isdecimal', 'isdigit', 'isidentifier', 'islower', 'isnumeric', 'isprintable', 'isspace', 'istitle', 'isupper', 'join', 'ljust', 'lower', 'lstrip', 'maketrans', 'partition', 'replace', 'rfind', 'rindex', 'rjust', 'rpartition', 'rsplit', 'rstrip', 'split', 'splitlines', 'startswith', 'strip', 'swapcase', 'title', 'translate', 'upper', 'zfill'] Array expected: [0.13030221 0.12689413 0.15776253 0.12518961 0.15403892 0.15031173 0.14999838 0.14959451 0.15207041 0.14871827] Array received: [0.12990024 0.12679544 0.15763125 0.12513097 0.15396506 0.15028471 0.1500004 0.14958562 0.15204367 0.14869695] args[0]: sgc args[0] is string: sgc ____ test_sgc_tstellate __ cnmodel/synapses/tests/test_synapses.py:25: in test_sgc_tstellate SynapseTester('sgc', 'tstellate') cnmodel/synapses/tests/testsynapses.py:72: in init UserTester.init(self, "%s%s" % (pre, post), pre, post) cnmodel/util/user_tester.py:35: in init self.assert_test_info(*args, *kwds) cnmodel/synapses/tests/test_synapses.py:108: in assert_test_info super(SynapseTester, self).assert_test_info(args, **kwds) cnmodel/util/user_tester.py:154: in assert_test_info self.compare_results(None, result, expect) cnmodel/util/user_tester.py:67: in compare_results self.compare_results(k, info[k], expect[k]) cnmodel/util/user_tester.py:70: in compare_results self.compare_results(key, info[i], expect[i]) cnmodel/util/user_tester.py:97: in compare_results self.compare_results(k, info[k], expect[k]) cnmodel/util/user_tester.py:94: in compare_results assert np.allclose(info[mask], expect[mask], rtol=self.rtol) E AssertionError ---------------------------------------------------------------------------------------------------- Captured stdout call ----------------------------------------------------------------------------------------------------- Elapsed time for 1 Repetitions: 0.612235
Comparing data array, shapes match: True Model tested: sgc_tstellate, measure: 20% latency args: ['add', 'class', 'contains', 'delattr', 'dir', 'doc', 'eq', 'format', 'ge', 'getattribute', 'getitem', 'getnewargs', 'gt', 'hash', 'init', 'init_subclass', 'iter', 'le', 'len', 'lt', 'mod', 'mul', 'ne', 'new', 'reduce', 'reduce_ex', 'repr', 'rmod', 'rmul', 'setattr', 'sizeof', 'str', 'subclasshook', 'capitalize', 'casefold', 'center', 'count', 'encode', 'endswith', 'expandtabs', 'find', 'format', 'formatmap', 'index', 'isalnum', 'isalpha', 'isascii', 'isdecimal', 'isdigit', 'isidentifier', 'islower', 'isnumeric', 'isprintable', 'isspace', 'istitle', 'isupper', 'join', 'ljust', 'lower', 'lstrip', 'maketrans', 'partition', 'replace', 'rfind', 'rindex', 'rjust', 'rpartition', 'rsplit', 'rstrip', 'split', 'splitlines', 'startswith', 'strip', 'swapcase', 'title', 'translate', 'upper', 'zfill'] Array expected: [0.69308864 0.79556712 0.74559008 0.77344193 0.77430411 0.82386196 0.74595242 0.8241403 0.77463667 0.7999326 ] Array received: [0.69434415 0.79589992 0.74570349 0.77357376 0.77429169 0.82386061 0.74596277 0.8242256 0.77464264 0.79993472] args[0]: sgc args[0] is string: sgc ____ test_sgctstellate2 ____ cnmodel/synapses/tests/test_synapses.py:28: in test_sgc_tstellate2 SynapseTester('sgc', 'tstellate') cnmodel/synapses/tests/testsynapses.py:72: in init UserTester.init(self, "%s%s" % (pre, post), pre, post) cnmodel/util/user_tester.py:35: in init self.assert_test_info(*args, *kwds) cnmodel/synapses/tests/test_synapses.py:108: in assert_test_info super(SynapseTester, self).assert_test_info(args, **kwds) cnmodel/util/user_tester.py:154: in assert_test_info self.compare_results(None, result, expect) cnmodel/util/user_tester.py:67: in compare_results self.compare_results(k, info[k], expect[k]) cnmodel/util/user_tester.py:70: in compare_results self.compare_results(key, info[i], expect[i]) cnmodel/util/user_tester.py:97: in compare_results self.compare_results(k, info[k], expect[k]) cnmodel/util/user_tester.py:94: in compare_results assert np.allclose(info[mask], expect[mask], rtol=self.rtol) E AssertionError ---------------------------------------------------------------------------------------------------- Captured stdout call ----------------------------------------------------------------------------------------------------- Elapsed time for 1 Repetitions: 0.634601
Comparing data array, shapes match: True Model tested: sgc_tstellate, measure: 20% latency args: ['add', 'class', 'contains', 'delattr', 'dir', 'doc', 'eq', 'format', 'ge', 'getattribute', 'getitem', 'getnewargs', 'gt', 'hash', 'init', 'init_subclass', 'iter', 'le', 'len', 'lt', 'mod', 'mul', 'ne', 'new', 'reduce', 'reduce_ex', 'repr', 'rmod', 'rmul', 'setattr', 'sizeof', 'str', 'subclasshook', 'capitalize', 'casefold', 'center', 'count', 'encode', 'endswith', 'expandtabs', 'find', 'format', 'formatmap', 'index', 'isalnum', 'isalpha', 'isascii', 'isdecimal', 'isdigit', 'isidentifier', 'islower', 'isnumeric', 'isprintable', 'isspace', 'istitle', 'isupper', 'join', 'ljust', 'lower', 'lstrip', 'maketrans', 'partition', 'replace', 'rfind', 'rindex', 'rjust', 'rpartition', 'rsplit', 'rstrip', 'split', 'splitlines', 'startswith', 'strip', 'swapcase', 'title', 'translate', 'upper', 'zfill'] Array expected: [0.69308864 0.79556712 0.74559008 0.77344193 0.77430411 0.82386196 0.74595242 0.8241403 0.77463667 0.7999326 ] Array received: [0.69434415 0.79589992 0.74570349 0.77357376 0.77429169 0.82386061 0.74596277 0.8242256 0.77464264 0.79993472] args[0]: sgc args[0] is string: sgc ____ test_sgc_dstellate __ cnmodel/synapses/tests/test_synapses.py:31: in test_sgc_dstellate SynapseTester('sgc', 'dstellate') cnmodel/synapses/tests/testsynapses.py:72: in init UserTester.init(self, "%s%s" % (pre, post), pre, post) cnmodel/util/user_tester.py:35: in init self.assert_test_info(*args, *kwds) cnmodel/synapses/tests/test_synapses.py:108: in assert_test_info super(SynapseTester, self).assert_test_info(args, **kwds) cnmodel/util/user_tester.py:154: in assert_test_info self.compare_results(None, result, expect) cnmodel/util/user_tester.py:67: in compare_results self.compare_results(k, info[k], expect[k]) cnmodel/util/user_tester.py:70: in compare_results self.compare_results(key, info[i], expect[i]) cnmodel/util/user_tester.py:97: in compare_results self.compare_results(k, info[k], expect[k]) cnmodel/util/user_tester.py:94: in compare_results assert np.allclose(info[mask], expect[mask], rtol=self.rtol) E AssertionError ---------------------------------------------------------------------------------------------------- Captured stdout call ----------------------------------------------------------------------------------------------------- Elapsed time for 1 Repetitions: 0.353511
Comparing data array, shapes match: True Model tested: sgc_dstellate, measure: 20% latency args: ['add', 'class', 'contains', 'delattr', 'dir', 'doc', 'eq', 'format', 'ge', 'getattribute', 'getitem', 'getnewargs', 'gt', 'hash', 'init', 'init_subclass', 'iter', 'le', 'len', 'lt', 'mod', 'mul', 'ne', 'new', 'reduce', 'reduce_ex', 'repr', 'rmod', 'rmul', 'setattr', 'sizeof', 'str', 'subclasshook', 'capitalize', 'casefold', 'center', 'count', 'encode', 'endswith', 'expandtabs', 'find', 'format', 'format_map', 'index', 'isalnum', 'isalpha', 'isascii', 'isdecimal', 'isdigit', 'isidentifier', 'islower', 'isnumeric', 'isprintable', 'isspace', 'istitle', 'isupper', 'join', 'ljust', 'lower', 'lstrip', 'maketrans', 'partition', 'replace', 'rfind', 'rindex', 'rjust', 'rpartition', 'rsplit', 'rstrip', 'split', 'splitlines', 'startswith', 'strip', 'swapcase', 'title', 'translate', 'upper', 'zfill'] Array expected: [0.69758345 0.72334678 0.74589235 0.8474736 0.72313864 0.7938418 0.84974859 0.82062624 0.84822158 0.84544384] Array received: [0.69895612 0.72346767 0.74590778 0.84750019 0.72314556 0.79468527 0.84976285 0.82063297 0.84822449 0.84545507] args[0]: sgc args[0] is string: sgc ____ test_dstellatebushy ____ cnmodel/synapses/tests/test_synapses.py:34: in test_dstellate_bushy SynapseTester('dstellate', 'bushy') cnmodel/synapses/tests/testsynapses.py:72: in init UserTester.init(self, "%s%s" % (pre, post), pre, post) cnmodel/util/user_tester.py:35: in init self.assert_test_info(*args, *kwds) cnmodel/synapses/tests/test_synapses.py:108: in assert_test_info super(SynapseTester, self).assert_test_info(args, **kwds) cnmodel/util/user_tester.py:154: in assert_test_info self.compare_results(None, result, expect) cnmodel/util/user_tester.py:67: in compare_results self.compare_results(k, info[k], expect[k]) cnmodel/util/user_tester.py:70: in compare_results self.compare_results(key, info[i], expect[i]) cnmodel/util/user_tester.py:97: in compare_results self.compare_results(k, info[k], expect[k]) cnmodel/util/user_tester.py:94: in compare_results assert np.allclose(info[mask], expect[mask], rtol=self.rtol) E AssertionError ---------------------------------------------------------------------------------------------------- Captured stdout call ----------------------------------------------------------------------------------------------------- Elapsed time for 1 Repetitions: 0.929721
Comparing data array, shapes match: True Model tested: dstellate_bushy, measure: 20% latency args: ['add', 'class', 'contains', 'delattr', 'dir', 'doc', 'eq', 'format', 'ge', 'getattribute', 'getitem', 'getnewargs', 'gt', 'hash', 'init', 'init_subclass', 'iter', 'le', 'len', 'lt', 'mod', 'mul', 'ne', 'new', 'reduce', 'reduce_ex', 'repr', 'rmod', 'rmul', 'setattr', 'sizeof', 'str', 'subclasshook', 'capitalize', 'casefold', 'center', 'count', 'encode', 'endswith', 'expandtabs', 'find', 'format', 'format_map', 'index', 'isalnum', 'isalpha', 'isascii', 'isdecimal', 'isdigit', 'isidentifier', 'islower', 'isnumeric', 'isprintable', 'isspace', 'istitle', 'isupper', 'join', 'ljust', 'lower', 'lstrip', 'maketrans', 'partition', 'replace', 'rfind', 'rindex', 'rjust', 'rpartition', 'rsplit', 'rstrip', 'split', 'splitlines', 'startswith', 'strip', 'swapcase', 'title', 'translate', 'upper', 'zfill'] Array expected: [0.79418947 0.84940772 0.87459424 0.87468865 0.87456684 0.92467369 0.92437739 0.94899433 0.94971789 0.92495172] Array received: [0.76918947 0.82440772 0.84959424 0.84968865 0.84956684 0.89967369 0.89937739 0.92399433 0.92471789 0.89995172] args[0]: dstellate args[0] is string: dstellate __ test_dstellate_tstellate ___ cnmodel/synapses/tests/test_synapses.py:37: in test_dstellate_tstellate SynapseTester('dstellate', 'tstellate') cnmodel/synapses/tests/testsynapses.py:72: in init UserTester.init(self, "%s%s" % (pre, post), pre, post) cnmodel/util/user_tester.py:35: in init self.assert_test_info(*args, *kwds) cnmodel/synapses/tests/test_synapses.py:108: in assert_test_info super(SynapseTester, self).assert_test_info(args, **kwds) cnmodel/util/user_tester.py:154: in assert_test_info self.compare_results(None, result, expect) cnmodel/util/user_tester.py:67: in compare_results self.compare_results(k, info[k], expect[k]) cnmodel/util/user_tester.py:70: in compare_results self.compare_results(key, info[i], expect[i]) cnmodel/util/user_tester.py:97: in compare_results self.compare_results(k, info[k], expect[k]) cnmodel/util/user_tester.py:94: in compare_results assert np.allclose(info[mask], expect[mask], rtol=self.rtol) E AssertionError ---------------------------------------------------------------------------------------------------- Captured stdout call ----------------------------------------------------------------------------------------------------- Elapsed time for 1 Repetitions: 1.164371
Comparing data array, shapes match: True Model tested: dstellate_tstellate, measure: 20% latency args: ['add', 'class', 'contains', 'delattr', 'dir', 'doc', 'eq', 'format', 'ge', 'getattribute', 'getitem', 'getnewargs', 'gt', 'hash', 'init', 'init_subclass', 'iter', 'le', 'len', 'lt', 'mod', 'mul', 'ne', 'new', 'reduce', 'reduce_ex', 'repr', 'rmod', 'rmul', 'setattr', 'sizeof', 'str', 'subclasshook', 'capitalize', 'casefold', 'center', 'count', 'encode', 'endswith', 'expandtabs', 'find', 'format', 'format_map', 'index', 'isalnum', 'isalpha', 'isascii', 'isdecimal', 'isdigit', 'isidentifier', 'islower', 'isnumeric', 'isprintable', 'isspace', 'istitle', 'isupper', 'join', 'ljust', 'lower', 'lstrip', 'maketrans', 'partition', 'replace', 'rfind', 'rindex', 'rjust', 'rpartition', 'rsplit', 'rstrip', 'split', 'splitlines', 'startswith', 'strip', 'swapcase', 'title', 'translate', 'upper', 'zfill'] Array expected: [0.64526165 0.66481897 0.77401916 0.74851229 0.72098648 0.74244124 0.77376867 0.79760721 0.7985437 0.7484276 ] Array received: [0.62026165 0.63981897 0.74901916 0.72351229 0.69598648 0.71744124 0.74876867 0.77260721 0.7735437 0.7234276 ] args[0]: dstellate args[0] is string: dstellate __ test_dstellate_dstellate _ cnmodel/synapses/tests/test_synapses.py:40: in test_dstellate_dstellate SynapseTester('dstellate', 'dstellate') cnmodel/synapses/tests/testsynapses.py:72: in init UserTester.init(self, "%s%s" % (pre, post), pre, post) cnmodel/util/user_tester.py:35: in init self.assert_test_info(*args, *kwds) cnmodel/synapses/tests/test_synapses.py:108: in assert_test_info super(SynapseTester, self).assert_test_info(args, **kwds) cnmodel/util/user_tester.py:154: in assert_test_info self.compare_results(None, result, expect) cnmodel/util/user_tester.py:67: in compare_results self.compare_results(k, info[k], expect[k]) cnmodel/util/user_tester.py:70: in compare_results self.compare_results(key, info[i], expect[i]) cnmodel/util/user_tester.py:97: in compare_results self.compare_results(k, info[k], expect[k]) cnmodel/util/user_tester.py:80: in compare_results assert np.all(inans == enans) E AssertionError ---------------------------------------------------------------------------------------------------- Captured stdout call ----------------------------------------------------------------------------------------------------- Elapsed time for 1 Repetitions: 0.359177 ___ testmatlab ____ cnmodel/util/tests/test_matlab.py:14: in test_matlab proc = matlab.engine.start_matlab() E NameError: name 'matlab' is not defined ====================================================================================================== warnings summary ======================================================================================================= ../venv/python/lib/python3.7/site-packages/scipy/linalg/init.py:212 /home/sabina/Documents/PhD/CNModel/venv/python/lib/python3.7/site-packages/scipy/linalg/init.py:212: DeprecationWarning: The module numpy.dual is deprecated. Instead of using dual, use the functions directly from numpy or scipy. from numpy.dual import register_func
../venv/python/lib/python3.7/site-packages/scipy/special/orthogonal.py:81 ../venv/python/lib/python3.7/site-packages/scipy/special/orthogonal.py:81 /home/sabina/Documents/PhD/CNModel/venv/python/lib/python3.7/site-packages/scipy/special/orthogonal.py:81: DeprecationWarning: np.int is a deprecated alias for the builtin int. To silence this warning, use int by itself. Doing this will not modify any behavior and is safe. When replacing np.int, you may wish to use e.g. np.int64 or np.int32 to specify the precision. If you wish to review your current use, check the release note link for additional information. Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations from numpy import (exp, inf, pi, sqrt, floor, sin, cos, around, int,
../venv/python/lib/python3.7/site-packages/scipy/spatial/_spherical_voronoi.py:15 /home/sabina/Documents/PhD/CNModel/venv/python/lib/python3.7/site-packages/scipy/spatial/_spherical_voronoi.py:15: PendingDeprecationWarning: Importing from numpy.matlib is deprecated since 1.19.0. The matrix subclass is not the recommended way to represent matrices or deal with linear algebra (see https://docs.scipy.org/doc/numpy/user/numpy-for-matlab-users.html). Please adjust your code to use regular ndarray. import numpy.matlib
../venv/python/lib/python3.7/site-packages/scipy/io/matlab/mio5.py:98 /home/sabina/Documents/PhD/CNModel/venv/python/lib/python3.7/site-packages/scipy/io/matlab/mio5.py:98: DeprecationWarning: np.bool is a deprecated alias for the builtin bool. To silence this warning, use bool by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.bool_ here. Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations from .mio5_utils import VarReader5
../venv/python/lib/python3.7/site-packages/matplotlib/init.py:186 ../venv/python/lib/python3.7/site-packages/matplotlib/init.py:186 /home/sabina/Documents/PhD/CNModel/venv/python/lib/python3.7/site-packages/matplotlib/init.py:186: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. a = distutils.version.LooseVersion(a)
../venv/python/lib/python3.7/site-packages/matplotlib/init.py:187 ../venv/python/lib/python3.7/site-packages/matplotlib/init.py:187 /home/sabina/Documents/PhD/CNModel/venv/python/lib/python3.7/site-packages/matplotlib/init.py:187: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. b = distutils.version.LooseVersion(b)
cnmodel/an_model/tests/test_cache.py::test_cache /home/sabina/Documents/PhD/CNModel/venv/python/lib/python3.7/site-packages/scipy/signal/_arraytools.py:45: FutureWarning: Using a non-tuple sequence for multidimensional indexing is deprecated; use arr[tuple(seq)] instead of arr[seq]. In the future this will be interpreted as an array index, arr[np.array(seq)], which will result either in an error or a different result. b = a[a_slice]
cnmodel/an_model/tests/test_cache.py::test_cache /home/sabina/Documents/PhD/CNModel/venv/python/lib/python3.7/site-packages/scipy/signal/signaltools.py:1341: FutureWarning: Using a non-tuple sequence for multidimensional indexing is deprecated; use arr[tuple(seq)] instead of arr[seq]. In the future this will be interpreted as an array index, arr[np.array(seq)], which will result either in an error or a different result. out_full[ind] += zi
cnmodel/an_model/tests/test_cache.py::test_cache /home/sabina/Documents/PhD/CNModel/venv/python/lib/python3.7/site-packages/scipy/signal/signaltools.py:1344: FutureWarning: Using a non-tuple sequence for multidimensional indexing is deprecated; use arr[tuple(seq)] instead of arr[seq]. In the future this will be interpreted as an array index, arr[np.array(seq)], which will result either in an error or a different result. out = out_full[ind]
cnmodel/an_model/tests/test_cache.py::test_cache /home/sabina/Documents/PhD/CNModel/venv/python/lib/python3.7/site-packages/scipy/signal/signaltools.py:1350: FutureWarning: Using a non-tuple sequence for multidimensional indexing is deprecated; use arr[tuple(seq)] instead of arr[seq]. In the future this will be interpreted as an array index, arr[np.array(seq)], which will result either in an error or a different result. zf = out_full[ind]
cnmodel/cells/tests/test_cells.py: 57743 warnings /home/sabina/Documents/PhD/CNModel/venv/python/lib/python3.7/site-packages/lmfit/model.py:626: DeprecationWarning: np.complex is a deprecated alias for the builtin complex. To silence this warning, use complex by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.complex128 here. Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations if diff.dtype == np.complex:
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =================================================================================================== short test summary info =================================================================================================== FAILED cnmodel/mechanisms/tests/test_mechanisms.py::test_max_open_probability - assert False FAILED cnmodel/synapses/tests/test_synapses.py::test_sgc_bushy - AssertionError FAILED cnmodel/synapses/tests/test_synapses.py::test_sgc_tstellate - AssertionError FAILED cnmodel/synapses/tests/test_synapses.py::test_sgc_tstellate2 - AssertionError FAILED cnmodel/synapses/tests/test_synapses.py::test_sgc_dstellate - AssertionError FAILED cnmodel/synapses/tests/test_synapses.py::test_dstellate_bushy - AssertionError FAILED cnmodel/synapses/tests/test_synapses.py::test_dstellate_tstellate - AssertionError FAILED cnmodel/synapses/tests/test_synapses.py::test_dstellate_dstellate - AssertionError FAILED cnmodel/util/tests/test_matlab.py::test_matlab - NameError: name 'matlab' is not defined
— Reply to this email directly, view it on GitHubhttps://github.com/cnmodel/cnmodel/issues/29#issuecomment-1424473569, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAA72XQIIJL5INBDGQTRAVTWWULUXANCNFSM6AAAAAAUVEVPPY. You are receiving this because you commented.Message ID: @.***>
Dear Paul,
I removed the cnmodel repo that I cloned in my virtual environment and instead cloned the one from your private repository. Indeed, when running test.py
I no longer got the matlab error, only the yellow SKIPPED. Otherwise, the output was the same: same assertion errors and deprecation warnings.
I tried setting up a virtual environment afresh following the instructions and using the shell script you provided on your private repo with an exception of changing one line in ./make_env.sh
from python3.9 to python 3.10. (Btw. sharing such a script is super useful, thank you!) I then ran test.py
. On a positive side, I no longer have errors related to the fftpack (without modifying anything in the code) or matlab (only the yellow SKIPPED) or any deprecation warnings. But I still have the same assertion errors resulting from the mismatch between expected and received array (it reproduced the same numbers as pasted in my previous reply).
If you have any suggestions of what I could do to help us track down the error, let me know. Otherwise, if you think it is ok to start working with it, then maybe I do that. I am only starting getting familiar with your package, so for now I will be just playing around and maybe along the way I trace the error.
Many thanks, Sabina
I think it is ok to start working with it, but we will need to track down the discrepancy.
Hello, I would like to work with CNmodel to run some simulations, but I am facing issues with installation. I run
toy_model.py
with no issues, but runningtest.py
results in the following error: I work on Ubuntu 22.04.1 LTS, I created a virtual environment with PyCharm, where I use a Python 3.7.16 interpreter. I followed the installation instructions here and ended up with the following list of packages (frompip freeze
): asteval==0.9.28 attrs==22.2.0 -e git+https://github.com/cnmodel/cnmodel.git@ff705f650e765142775f4ae0e3c3159e30af8944#egg=cnmodel cochlea==2 cycler==0.11.0 Cython==0.29.33 exceptiongroup==1.1.0 future==0.18.3 importlib-metadata==6.0.0 iniconfig==2.0.0 kiwisolver==1.4.4 llvmlite==0.39.1 lmfit==0.9.11 matplotlib==3.0.3 NEURON==8.2.2 nose==1.3.7 numba==0.56.4 numpy==1.21.6 packaging==23.0 pandas==1.3.5 pluggy==1.0.0 pyparsing==3.0.9 PyQt5==5.15.9 PyQt5-Qt5==5.15.2 PyQt5-sip==12.11.1 pyqtgraph==0.11.0 pytest==7.2.1 pytest-faulthandler==2.0.1 python-dateutil==2.8.2 pytz==2022.7.1 resampy==0.4.2 scipy==1.1.0 six==1.16.0 tomli==2.0.1 typing_extensions==4.4.0 uncertainties==3.1.7 zipp==3.12.1I suspect I need a different version of Numpy, but when I downgrade to 1.14.3, I get a warning from PyCharm, that numpy>=1.1 is required and I get tonnes of other errors when running test.py. Any help would be much appreciated!
Best wishes, Sabina