MCPcopy
hub / github.com/mne-tools/mne-python / _eye_array

Function _eye_array

mne/fixes.py:146–149  ·  view source on GitHub ↗
(n, *, format="csr")

Source from the content-addressed store, hash-verified

144
145# Can be replaced with sparse.eye_array once we depend on SciPy >= 1.12
146def _eye_array(n, *, format="csr"): # noqa: A002
147 from scipy import sparse
148
149 return sparse.dia_array((np.ones(n), 0), shape=(n, n)).asformat(format)
150
151
152###############################################################################

Callers 11

test_object_sizeFunction · 0.90
test_hashFunction · 0.90
test_custom_lru_cacheFunction · 0.90
_stc_to_labelFunction · 0.90
test_make_morph_mapsFunction · 0.90
test_permutation_t_testFunction · 0.90
_hemi_morphFunction · 0.85
_surf_upsampling_matFunction · 0.85
_make_morph_map_hemiFunction · 0.85

Calls

no outgoing calls

Tested by 7

test_object_sizeFunction · 0.72
test_hashFunction · 0.72
test_custom_lru_cacheFunction · 0.72
_stc_to_labelFunction · 0.72
test_make_morph_mapsFunction · 0.72
test_permutation_t_testFunction · 0.72