pyampact.symbolicUtils.snapTo
- pyampact.symbolicUtils.snapTo(data, snap_to=None, filler='forward', output='array')[source]
” Takes a harm, keys, functions, chords, or cdata as data and the snap_to and filler parameters as described in the former three’s doc strings.
The passed data is returned in the shape of the snap_to dataframe’s columns, and any filling operations are applied. The output will be in the form of a 1D numpy array unless output is changed, in which case a series will be returned for harm, keys, functions, and chords data, and a dataframe for cdata data.
- Parameters:
data – Can be harm, keys, functions, chords, or cdata.
snap_to – Described in the docstrings of harm, keys, and functions.
filler – Described in the docstrings of harm, keys, and functions.
output – If changed, a series will be returned for harm, keys, functions, and chords data, and a dataframe for cdata data. Default is a 1D numpy array.
- Returns:
The passed data in the shape of the snap_to dataframe’s columns with any filling operations applied.