You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It appears that upon the addition of multivariate connectivity methods in #138, the following was introduced on line 483 in mne_connectivity/spectral/time.py.
This leads to memory problems with real data. In my current case, the array becomes of size (7, 2, 100128, 100128, 32), which would require 32 TiB of memory. This problem does not occur with version 0.5.
Steps to reproduce
Try running the standard example with large number of signals (448 in my case) and frequencies.
Expected results
Code should run normally.
Actual results
I receive the following error:
File "<decorator-gen-290>", line 12, in spectral_connectivity_time
File "*/miniconda3/envs/connectivity-pipeline/lib/python3.12/site-packages/mne_connectivity/spectral/time.py", line 543, in spectral_connectivity_time
conn_patterns[m] = np.full(
^^^^^^^^
File "*/miniconda3/envs/connectivity-pipeline/lib/python3.12/site-packages/numpy/core/numeric.py", line 329, in full
a = empty(shape, dtype, order)
^^^^^^^^^^^^^^^^^^^^^^^^^^
numpy.core._exceptions._ArrayMemoryError: Unable to allocate 32.7 TiB for an array with shape (7, 2, 100128, 100128, 32) and data type float64
Additional information
I'm running MNE-Python v1.6 and MNE-Connectivity v0.6.
Pinging here already @adam2392 and @tsbinns. For a quick fix, I guess the conn_patterns array could be initialized only if a multivariate method is used?
The text was updated successfully, but these errors were encountered:
Describe the bug
It appears that upon the addition of multivariate connectivity methods in #138, the following was introduced on line 483 in mne_connectivity/spectral/time.py.
and this was later changed to
in #142.
This leads to memory problems with real data. In my current case, the array becomes of size
(7, 2, 100128, 100128, 32)
, which would require 32 TiB of memory. This problem does not occur with version 0.5.Steps to reproduce
Try running the standard example with large number of signals (448 in my case) and frequencies.
Expected results
Code should run normally.
Actual results
I receive the following error:
Additional information
I'm running MNE-Python v1.6 and MNE-Connectivity v0.6.
Pinging here already @adam2392 and @tsbinns. For a quick fix, I guess the
conn_patterns
array could be initialized only if a multivariate method is used?The text was updated successfully, but these errors were encountered: