Skip to content

Commit

Permalink
Fix: Missing switch cases
Browse files Browse the repository at this point in the history
  • Loading branch information
ashvardanian committed Apr 25, 2024
1 parent 0af7cbf commit 5ff26ad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions swift/Encoders.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -41,7 +41,7 @@ public enum Embedding {
)
)
)
case .float32:
case .float32, .float:
self = .f32s(
Array(
UnsafeBufferPointer(
Expand Down

0 comments on commit 5ff26ad

Please sign in to comment.