When building the doc:
Unexpected failing examples (1):
../../examples/plot_fmri_data_example.py failed leaving traceback:
Traceback (most recent call last):
File "/Users/abaker/Documents/hidimstat/examples/plot_fmri_data_example.py", line 71, in <module>
resource.setrlimit(resource.RLIMIT_AS, (int(5 * 1e9), int(5 * 1e9)))
~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: current limit exceeds maximum limit
According to copilot, a possible fix is to ensure the limit does not exceed the system's maximum:
import resource
soft, hard = resource.getrlimit(resource.RLIMIT_AS)
new_limit = int(5 * 1e9)
resource.setrlimit(resource.RLIMIT_AS, (min(new_limit, hard), hard))