---
title: "coordinate(alongAxis:withShapeTensor:name:)"
framework: metalperformanceshadersgraph
role: symbol
role_heading: Instance Method
path: "metalperformanceshadersgraph/mpsgraph/coordinate(alongaxis:withshapetensor:name:)"
---

# coordinate(alongAxis:withShapeTensor:name:)

Creates a get-coordindate operation and returns the result tensor.

## Declaration

```swift
func coordinate(alongAxis axis: Int, withShapeTensor shapeTensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
```

## Parameters

- `axis`: The coordinate axis an element’s value is set to. Negative values wrap around.
- `shapeTensor`: A rank-1 tensor of type MPSDataTypeInt32 or MPSDataTypeInt64 that defines the shape of the result tensor.
- `name`: The name for the operation.

## Return Value

Return Value A valid MPSGraphTensor object.

## Discussion

Discussion See coordinate(alongAxis:withShape:name:).
