[MRG] Improve docstring format and support floats for conductivity in make_bem_model#12020
[MRG] Improve docstring format and support floats for conductivity in make_bem_model#12020larsoner merged 40 commits intomne-tools:mainfrom
Conversation
This reverts commit c728bd7.
drammock
left a comment
There was a problem hiding this comment.
oops, didn't notice this was in draft mode when I started reviewing. Stopping mid-way. Ping when ready for a complete review
Co-authored-by: Daniel McCloy <dan@mccloy.info>
|
The cookbook! I can't believe it took me so long to discover this lovely page! A grep on To my knowledge (and I've been digging around during a good part of my afternoon), that's the only document which chains all the operation needed to get from a |
see #6778 |
Co-authored-by: Daniel McCloy <dan@mccloy.info>
mscheltienne
left a comment
There was a problem hiding this comment.
This PR adds x-ref and style fixes to docstrings + the 3 code changes listed below.
| conductivity = np.array(conductivity, float) | ||
| conductivity = np.atleast_1d(conductivity).astype(float) | ||
| if conductivity.ndim != 1 or conductivity.size not in (1, 3): | ||
| raise ValueError("conductivity must be 1D array-like with 1 or 3 " "elements") | ||
| raise ValueError( | ||
| "conductivity must be a float or a 1D array-like with 1 or 3 elements" | ||
| ) |
There was a problem hiding this comment.
First code-change in this PR, supporting floats directly for conductivity instead of array of shape (1, ) for single-layer model.
mne/source_space/_source_space.py
Outdated
| n_jobs=None, | ||
| *, |
There was a problem hiding this comment.
Second code change, add the argument n_jobs to setup_volume_source_space used by _make_volume_source_space.
| sharex=True, | ||
| sharey=False, | ||
| figsize=(8.8, 2.2 * n_rows), | ||
| constrained_layout=True, |
for more information, see https://pre-commit.ci
larsoner
left a comment
There was a problem hiding this comment.
Just some minor comments, otherwise looks great!
Co-authored-by: Eric Larson <larson.eric.d@gmail.com>
|
@mscheltienne don't forget to ping us after you push commits assuming you're done, I have turned off commit notifications in my GitHub preferences (and I assume many other maintainers have as well)! I should be able to look and merge tomorrow |
|
Sure, no hurry on that one ;) |
… make_bem_model (mne-tools#12020) Co-authored-by: Daniel McCloy <dan@mccloy.info> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Eric Larson <larson.eric.d@gmail.com>


make_bem_modelon top of arrays of shape (1,).