mne.viz.centers_to_edges

mne.viz.centers_to_edges(*arrays)[source]

Convert center points to edges.

Parameters
*arrayslist of ndarray

Each input array should be 1D monotonically increasing, and will be cast to float.

Returns
arrayslist of ndarray

Given each input of shape (N,), the output will have shape (N+1,).

Examples

>>> x = [0., 0.1, 0.2, 0.3]
>>> y = [20, 30, 40]
>>> centers_to_edges(x, y)  
[array([-0.05, 0.05, 0.15, 0.25, 0.35]), array([15., 25., 35., 45.])]