Skip to content

Commit a435364

Browse files
authored
Update TensorTest.swift
1 parent ee0f680 commit a435364

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

extension/apple/ExecuTorch/__tests__/TensorTest.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ class TensorTest: XCTestCase {
153153
let tensor = data.withUnsafeMutableBytes {
154154
Tensor(bytesNoCopy: $0.baseAddress!, shape: [2, 3], dataType: .float)
155155
}
156-
let array: [Float] = try tensor.withUnsafeBytes { Array($0) }
156+
let array = try tensor.withUnsafeBytes([Float].init)
157157
XCTAssertEqual(array, data)
158158
}
159159

0 commit comments

Comments
 (0)