function frame_(signal, frameLength, frameStep, padEnd = false, padValue = 0) {
    let start = 0;
    const output = [];
    while(start + frameLength <= signal.size){
        output.push((0, _slice.slice)(signal, start, frameLength));
        start += frameStep;
    }
    if (padEnd) while(start < signal.size){
        const padLen = start + frameLength - signal.size;
        const pad = (0, _concat.concat)([
            (0, _slice.slice)(signal, start, frameLength - padLen),
            (0, _fill.fill)([
                padLen
            ], padValue)
        ]);
        output.push(pad);
        start += frameStep;
    }
    if (output.length === 0) return (0, _tensor2D.tensor2d)([], [
        0,
        frameLength
    ]);
    return (0, _reshape.reshape)((0, _concat.concat)(output), [
        output.length,
        frameLength
    ]);
}
Expands input into frames of frameLength.
Slides a window size with frameStep.

```js
tf.signal.frame([1, 2, 3], 2, 1).print();
```
@param signal The input tensor to be expanded
@param frameLength Length of each frame
@param frameStep The frame hop size in samples.
@param padEnd Whether to pad the end of signal with padValue.
@param padValue A number to use where the input signal does
    not exist when padEnd is True.

@doc {heading: 'Operations', subheading: 'Signal', namespace: 'signal'}