<!--
{
  "availability" : [
    "iOS: 11.0.0 -",
    "iPadOS: 11.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.13.0 -",
    "tvOS: 11.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 4.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Accelerate",
  "identifier" : "/documentation/Accelerate/SparseConvertFromCoordinate(_:_:_:_:_:_:_:_:)-4n2el",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Accelerate"
    ],
    "preciseIdentifier" : "c:@F@SparseConvertFromCoordinate#I#I#L#c#$@SA@SparseAttributes_t#*1I#S1_#*1d#"
  },
  "title" : "SparseConvertFromCoordinate(_:_:_:_:_:_:_:_:)"
}
-->

# SparseConvertFromCoordinate(_:_:_:_:_:_:_:_:)

Converts from coordinate format arrays to a matrix of real double-precision values, dropping out-of-range entries and summing duplicates.

```
func SparseConvertFromCoordinate(_ rowCount: Int32, _ columnCount: Int32, _ blockCount: Int, _ blockSize: UInt8, _ attributes: SparseAttributes_t, _ row: UnsafePointer<Int32>, _ column: UnsafePointer<Int32>, _ data: UnsafePointer<Double>) -> SparseMatrix_Double
```

## Parameters

`rowCount`

The number of rows in the structure.

`columnCount`

The number of columns in the structure.

`blockCount`

The number of blocks in the matrix.

`blockSize`

The block size for data storage on both input and output.

`attributes`

The attributes of the matrix to create. The conversion forces the matrix to conform to the specified attributes by copying or dropping elements as necessary.

`row`

The row indices of the matrix structure.

`column`

The column indices of the matrix structure.

`data`

The contents of the structurally nonzero (block) matrix elements.

## Return Value

A new [`SparseMatrix_Double`](/documentation/Accelerate/SparseMatrix_Double) object. After you finish using a sparse matrix, call [`SparseCleanup(_:)`](/documentation/Accelerate/SparseCleanup(_:)-6ywzn) to release its references to any memory that the Sparse Solvers library allocates.

## Discussion

The conversion drops out-of-range entries, and sums duplicate entries.

You may supply entries in either triangle for symmetric matrices. The conversion transposes entries in the triangle that [`triangle`](/documentation/Accelerate/SparseAttributes_t/triangle) doesn’t specify, and sums duplicate entries.

For triangular matrices, the conversion drops entries in the triangle that [`triangle`](/documentation/Accelerate/SparseAttributes_t/triangle) doesn’t specify.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)