From 5ff26ad9400c51dcb2aa313fdcab454efa1eb66d Mon Sep 17 00:00:00 2001 From: Ash Vardanian <1983160+ashvardanian@users.noreply.github.com> Date: Wed, 24 Apr 2024 20:07:30 -0700 Subject: [PATCH] Fix: Missing `switch` cases --- swift/Encoders.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/swift/Encoders.swift b/swift/Encoders.swift index 509ad11..ebfcd73 100644 --- a/swift/Encoders.swift +++ b/swift/Encoders.swift @@ -32,7 +32,7 @@ public enum Embedding { /// - Returns: nil if the data type is unsupported. init?(from multiArray: MLMultiArray) { switch multiArray.dataType { - case .float64: + case .float64, .double: self = .f64s( Array( UnsafeBufferPointer( @@ -41,7 +41,7 @@ public enum Embedding { ) ) ) - case .float32: + case .float32, .float: self = .f32s( Array( UnsafeBufferPointer(