def get_snippet_idx(snippet, full_array):
""" Find the indices of ``full_array`` where ``snippet`` is present.
Assumes both ``snippet`` and ``full_array`` are ordered.
Parameters
----------
snippet : np.array
Array of ordered time stamps
full_array : np.array
Array of ordered time stamps
Returns
-------
idx : np.array
Array of booleans indicating where in ``full_array`` ``snippet``
is present.
"""
idx = np.logical_and(
full_array >= snippet[0], full_array <= snippet[-1]
)
return idx
评论列表
文章目录