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

Function sum_squared

mne/utils/numerics.py:66–80  ·  view source on GitHub ↗

Compute norm of an array. Parameters ---------- X : array Data whose norm must be found. Returns ------- value : float Sum of squares of the input array X.

(X)

Source from the content-addressed store, hash-verified

64
65
66def sum_squared(X):
67 """Compute norm of an array.
68
69 Parameters
70 ----------
71 X : array
72 Data whose norm must be found.
73
74 Returns
75 -------
76 value : float
77 Sum of squares of the input array X.
78 """
79 X_flat = X.ravel(order="F" if np.isfortran(X) else "C")
80 return np.dot(X_flat, X_flat)
81
82
83def _compute_row_norms(data):

Callers 12

test_sum_squaredFunction · 0.90
test_notch_filtersFunction · 0.90
test_csd_fourierFunction · 0.90
test_csd_multitaperFunction · 0.90
_mt_spectrum_removeFunction · 0.85
qrs_detectorFunction · 0.85
mixed_normFunction · 0.85
tf_mixed_normFunction · 0.85
_primal_l21Function · 0.85
_mixed_norm_solver_cdFunction · 0.85
_bcdFunction · 0.85
dgap_l21l1Function · 0.85

Calls

no outgoing calls

Tested by 4

test_sum_squaredFunction · 0.72
test_notch_filtersFunction · 0.72
test_csd_fourierFunction · 0.72
test_csd_multitaperFunction · 0.72