---
title: "coordinate(alongAxisTensor:withShape:name:)"
framework: metalperformanceshadersgraph
role: symbol
role_heading: Instance Method
path: "metalperformanceshadersgraph/mpsgraph/coordinate(alongaxistensor:withshape:name:)"
---

# coordinate(alongAxisTensor:withShape:name:)

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

## Declaration

```swift
func coordinate(alongAxisTensor axisTensor: MPSGraphTensor, withShape shape: [NSNumber], name: String?) -> MPSGraphTensor
```

## Parameters

- `axisTensor`: A Scalar tensor of type MPSDataTypeInt32, that specifies the coordinate axis an element’s value is set to. Negative values wrap around.
- `shape`: 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:).
