function meshgrid(x, y, { indexing = "xy" } = {}) {
    if (indexing !== "xy" && indexing !== "ij") throw new TypeError(`${indexing} is not a valid third argument to meshgrid`);
    if (x === undefined) return [];
    let $x = (0, _tensorUtilEnv.convertToTensor)(x, "x", "meshgrid", x instanceof (0, _tensor.Tensor) ? x.dtype : "float32");
    if (y === undefined) return [
        $x
    ];
    let $y = (0, _tensorUtilEnv.convertToTensor)(y, "y", "meshgrid", y instanceof (0, _tensor.Tensor) ? y.dtype : "float32");
    const w = (0, _utilBase.sizeFromShape)($x.shape);
    const h = (0, _utilBase.sizeFromShape)($y.shape);
    if (indexing === "xy") {
        $x = (0, _reshape.reshape)($x, [
            1,
            -1
        ]);
        $y = (0, _reshape.reshape)($y, [
            -1,
            1
        ]);
        return [
            (0, _matMul.matMul)((0, _ones.ones)([
                h,
                1
            ], $x.dtype), $x),
            (0, _matMul.matMul)($y, (0, _ones.ones)([
                1,
                w
            ], $y.dtype))
        ];
    }
    $x = (0, _reshape.reshape)($x, [
        -1,
        1
    ]);
    $y = (0, _reshape.reshape)($y, [
        1,
        -1
    ]);
    return [
        (0, _matMul.matMul)($x, (0, _ones.ones)([
            1,
            h
        ], $x.dtype)),
        (0, _matMul.matMul)((0, _ones.ones)([
            w,
            1
        ], $y.dtype), $y)
    ];
}
Broadcasts parameters for evaluation on an N-D grid.

Given N one-dimensional coordinate arrays `*args`, returns a list `outputs`
of N-D coordinate arrays for evaluating expressions on an N-D grid.

Notes:
`meshgrid` supports cartesian ('xy') and matrix ('ij') indexing conventions.
When the `indexing` argument is set to 'xy' (the default), the broadcasting
instructions for the first two dimensions are swapped.
Examples:
Calling `const [X, Y] = meshgrid(x, y)` with the tensors

```javascript
const x = [1, 2, 3];
const y = [4, 5, 6];
const [X, Y] = tf.meshgrid(x, y);
// X = [[1, 2, 3],
//      [1, 2, 3],
//      [1, 2, 3]]
// Y = [[4, 4, 4],
//      [5, 5, 5],
//      [6, 6, 6]]
```

@param x Tensor with rank geq 1.
@param y Tensor with rank geq 1.
@param indexing

@doc {heading: 'Operations', subheading: 'Slicing and Joining'}