<!--
{
  "documentType" : "article",
  "framework" : "Accelerate",
  "identifier" : "/documentation/Accelerate/conversion-from-other-formats",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Conversion from Other Formats"
}
-->

# Conversion from Other Formats

Create sparse matrices from coordinate format arrays and BLAS opaque matrices.

## Topics

### Support for coordinate format arrays

  <doc://com.apple.accelerate/documentation/Accelerate/creating-a-sparse-matrix-from-coordinate-format-arrays>

[`func SparseConvertFromCoordinate(Int32, Int32, Int, UInt8, SparseAttributes_t, UnsafePointer<Int32>, UnsafePointer<Int32>, UnsafePointer<Double>) -> SparseMatrix_Double`](/documentation/Accelerate/SparseConvertFromCoordinate(_:_:_:_:_:_:_:_:)-4n2el)

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

[`func SparseConvertFromCoordinate(Int32, Int32, Int, UInt8, SparseAttributes_t, UnsafePointer<Int32>, UnsafePointer<Int32>, UnsafePointer<Float>) -> SparseMatrix_Float`](/documentation/Accelerate/SparseConvertFromCoordinate(_:_:_:_:_:_:_:_:)-4n2th)

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

[`func SparseConvertFromCoordinate(Int32, Int32, Int, UInt8, SparseAttributes_t, UnsafePointer<Int32>, UnsafePointer<Int32>, UnsafePointer<Double>, UnsafeMutableRawPointer, UnsafeMutableRawPointer) -> SparseMatrix_Double`](/documentation/Accelerate/SparseConvertFromCoordinate(_:_:_:_:_:_:_:_:_:_:)-56hv8)

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

[`func SparseConvertFromCoordinate(Int32, Int32, Int, UInt8, SparseAttributes_t, UnsafePointer<Int32>, UnsafePointer<Int32>, UnsafePointer<Float>, UnsafeMutableRawPointer, UnsafeMutableRawPointer) -> SparseMatrix_Float`](/documentation/Accelerate/SparseConvertFromCoordinate(_:_:_:_:_:_:_:_:_:_:)-84plp)

Converts from coordinate format arrays to a matrix of real single-precision values, dropping out-of-range entries and summing duplicates, without any internal memory allocations.

### Support for complex coordinate format arrays

[`func SparseConvertFromCoordinate(Int32, Int32, Int, UInt8, SparseAttributesComplex_t, UnsafePointer<Int32>, UnsafePointer<Int32>, OpaquePointer) -> SparseMatrix_Complex_Double`](/documentation/Accelerate/SparseConvertFromCoordinate(_:_:_:_:_:_:_:_:)-58kub)

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

[`func SparseConvertFromCoordinate(Int32, Int32, Int, UInt8, SparseAttributesComplex_t, UnsafePointer<Int32>, UnsafePointer<Int32>, OpaquePointer) -> SparseMatrix_Complex_Float`](/documentation/Accelerate/SparseConvertFromCoordinate(_:_:_:_:_:_:_:_:)-58lgv)

Convert from coordinate format arrays to a  matrix of complex float values,
dropping out-of-range entries and summing duplicates.

[`func SparseConvertFromCoordinate(Int32, Int32, Int, UInt8, SparseAttributesComplex_t, UnsafePointer<Int32>, UnsafePointer<Int32>, OpaquePointer, UnsafeMutableRawPointer, UnsafeMutableRawPointer) -> SparseMatrix_Complex_Float`](/documentation/Accelerate/SparseConvertFromCoordinate(_:_:_:_:_:_:_:_:_:_:)-2blwb)

Convert from coordinate format arrays to a  matrix of complex float values,
dropping out-of-range entries and summing duplicates.

[`func SparseConvertFromCoordinate(Int32, Int32, Int, UInt8, SparseAttributesComplex_t, UnsafePointer<Int32>, UnsafePointer<Int32>, OpaquePointer, UnsafeMutableRawPointer, UnsafeMutableRawPointer) -> SparseMatrix_Complex_Double`](/documentation/Accelerate/SparseConvertFromCoordinate(_:_:_:_:_:_:_:_:_:_:)-6ocm1)

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

### BLAS support

[`func SparseConvertFromOpaque(sparse_matrix_double) -> SparseMatrix_Double`](/documentation/Accelerate/SparseConvertFromOpaque(_:)-6n7rw)

Returns a sparse matrix of double-precision, floating-point values from a BLAS opaque matrix.

[`func SparseConvertFromOpaque(sparse_matrix_float) -> SparseMatrix_Float`](/documentation/Accelerate/SparseConvertFromOpaque(_:)-4u519)

Returns a sparse matrix of single-precision, floating-point values from a BLAS opaque matrix.

[`func SparseConvertFromOpaque(sparse_matrix_float_complex) -> SparseMatrix_Complex_Float`](/documentation/Accelerate/SparseConvertFromOpaque(_:)-9ll2d)

Converts an opaque matrix of complex float values object to a transparent
sparse matrix object. When you are done with this matrix, release
the memory that has been allocated by calling `SparseCleanup` on it.

[`func SparseConvertFromOpaque(sparse_matrix_double_complex) -> SparseMatrix_Complex_Double`](/documentation/Accelerate/SparseConvertFromOpaque(_:)-9xju4)

Converts an opaque matrix of complex double values object to a transparent
sparse matrix object. When you are done with this matrix, release
the memory that has been allocated by calling `SparseCleanup` on it.



---

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)