Caution

You're reading an old version of this documentation. If you want up-to-date information, please have a look at 0.9.1.

Utilities

Array operations

frame(x[, frame_length, hop_length, axis])

Slice a data array into (overlapping) frames.

pad_center(data, size[, axis])

Wrapper for np.pad to automatically center an array prior to padding.

fix_length(data, size[, axis])

Fix the length an array data to exactly size.

fix_frames(frames[, x_min, x_max, pad])

Fix a list of frames to lie within [x_min, x_max]

index_to_slice(idx[, idx_min, idx_max, ...])

Generate a slice array from an index array.

softmask(X, X_ref[, power, split_zeros])

Robustly compute a softmask operation.

stack(arrays[, axis])

Stack one or more arrays along a target axis.

sync(data, idx[, aggregate, pad, axis])

Synchronous aggregation of a multi-dimensional array between boundaries

axis_sort(S[, axis, index, value])

Sort an array along its rows or columns.

normalize(S[, norm, axis, threshold, fill])

Normalize an array along a chosen axis.

shear(X[, factor, axis])

Shear a matrix by a given factor.

sparsify_rows(x[, quantile])

Return a row-sparse matrix approximating the input x.

buf_to_float(x[, n_bytes, dtype])

Convert an integer buffer to floating point values.

tiny(x)

Compute the tiny-value corresponding to an input's data type.

Matching

match_intervals(intervals_from, intervals_to)

Match one set of time intervals to another.

match_events(events_from, events_to[, left, ...])

Match one set of events to another.

Miscellaneous

localmax(x[, axis])

Find local maxima in an array x.

peak_pick(x, pre_max, post_max, pre_avg, ...)

Uses a flexible heuristic to pick peaks in a signal.

nnls(A, B, **kwargs)

Non-negative least squares.

cyclic_gradient(data[, edge_order, axis])

Estimate the gradient of a function over a uniformly sampled, periodic domain.

Input validation

valid_audio(y[, mono])

Validate whether a variable contains valid, mono audio data.

valid_int(x[, cast])

Ensure that an input value is integer-typed.

valid_intervals(intervals)

Ensure that an array is a valid representation of time intervals:

File operations

example_audio_file()

Get the path to an included audio example file.

find_files(directory[, ext, recurse, ...])

Get a sorted list of (audio) files in a directory or directory sub-tree.

Deprecated

roll_sparse(x, shift[, axis])

Sparse matrix roll