Skip to content

Commit e0b6bf5

Browse files
added missing Float16 supoport
Co-authored-by: Caleb Aikens <[email protected]>
1 parent bf9ca98 commit e0b6bf5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/BufferType.cc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,12 @@
2323
/* static */
2424
const char *BufferType::_toPyBufferFormatCode(JS::Scalar::Type subtype) {
2525
// floating point types
26-
if (subtype == JS::Scalar::Float32) {
26+
switch (subtype) {
27+
case JS::Scalar::Float16:
28+
return "e";
29+
case JS::Scalar::Float32:
2730
return "f";
28-
} else if (subtype == JS::Scalar::Float64) {
31+
case JS::Scalar::Float64:
2932
return "d";
3033
}
3134

0 commit comments

Comments
 (0)