function eye_(numRows, numColumns, batchShape, dtype = "float32") {
    if (numColumns == null) numColumns = numRows;
    const buff = (0, _buffer.buffer)([
        numRows,
        numColumns
    ], dtype);
    const n = numRows <= numColumns ? numRows : numColumns;
    for(let i = 0; i < n; ++i)buff.set(1, i, i);
    const out = (0, _reshape.reshape)(buff.toTensor(), [
        numRows,
        numColumns
    ]);
    if (batchShape == null) return out;
    else {
        if (batchShape.length === 1) return (0, _tile.tile)((0, _expandDims.expandDims)(out, 0), [
            batchShape[0],
            1,
            1
        ]);
        else if (batchShape.length === 2) // tslint:disable-next-line:no-unnecessary-type-assertion
        return (0, _tile.tile)((0, _expandDims.expandDims)((0, _expandDims.expandDims)(out, 0), 0), [
            batchShape[0],
            batchShape[1],
            1,
            1
        ]);
        else if (batchShape.length === 3) // tslint:disable-next-line:no-unnecessary-type-assertion
        return (0, _tile.tile)((0, _expandDims.expandDims)((0, _expandDims.expandDims)((0, _expandDims.expandDims)(out, 0), 0), 0), [
            batchShape[0],
            batchShape[1],
            batchShape[2],
            1,
            1
        ]);
        else throw new Error(`eye() currently supports only 1D and 2D ` + // tslint:disable-next-line:no-any
        `batchShapes, but received ${batchShape.length}D.`);
    }
}
Create an identity matrix.

@param numRows Number of rows.
@param numColumns Number of columns. Defaults to `numRows`.
@param batchShape If provided, will add the batch shape to the beginning
  of the shape of the returned `tf.Tensor` by repeating the identity
  matrix.
@param dtype Data type.
@returns Identity matrix of the specified size and data type, possibly
  with batch repetition if `batchShape` is specified.

@doc {heading: 'Tensors', subheading: 'Creation'}