static fillIndex(broadcastedIndices, originalShape, originalIndices) {
        // NOTE 1: we assume the parameter broadcastedIndices is valid. ie. it should have the same length as the
        // broadcasted shape, and for each dimension the index should not be out of range.
        // NOTE 2: we assume the parameter originalIndices has the same length as the originalShape
        const dimOffset = broadcastedIndices.length - originalShape.length;
        for (let i = 0; i < originalShape.length; i++) {
            originalIndices[i] = broadcastedIndices[dimOffset + i] % originalShape[i];
        }
    }
/**
     * Given the indices of a broadcasted tensor, calculate the original indices
     * @param broadcastedIndices The given indices of the broadcasted tensor.
     * @param originalShape The original shape of the tensor before broadcast
     * @param originalIndices The mapping of broadcastedIndices to the originalIndices (output parameter - will be
     *     mutated).
     */
Given the indices of a broadcasted tensor, calculate the original indices
@param broadcastedIndices The given indices of the broadcasted tensor.
@param originalShape The original shape of the tensor before broadcast
@param originalIndices The mapping of broadcastedIndices to the originalIndices (output parameter - will be
mutated).
Given the indices of a broadcasted tensor calculate the original indices @param broadcastedIndices The given indices of the broadcasted tensor . @param originalShape The original shape of the tensor before broadcast @param originalIndices The mapping of broadcastedIndices to the originalIndices ( output parameter - will be mutated ) .
static fillIndex(broadcastedIndices, originalShape, originalIndices) {
        const dimOffset = broadcastedIndices.length - originalShape.length;
        for (let i = 0; i < originalShape.length; i++) {
            originalIndices[i] = broadcastedIndices[dimOffset + i] % originalShape[i];
        }
    }
static fillIndex ( broadcastedIndices , originalShape , originalIndices ) { const dimOffset = broadcastedIndices . length - originalShape . length ; for ( let i = 0 ; i < originalShape . length ; i ++ ) { originalIndices [ i ] = broadcastedIndices [ dimOffset + i ] % originalShape [ i ] ; } }
Given the indices of a broadcasted tensor, calculate the original indices
 @param broadcastedIndices The given indices of the broadcasted tensor.
Given the indices of a broadcasted tensor calculate the original indices @param broadcastedIndices The given indices of the broadcasted tensor .
// NOTE 1: we assume the parameter broadcastedIndices is valid. ie. it should have the same length as the // broadcasted shape, and for each dimension the index should not be out of range. // NOTE 2: we assume the parameter originalIndices has the same length as the originalShape