Skip to content

Commit 60ffb45

Browse files
committed
write binary dataframe file
1 parent c1b2e7e commit 60ffb45

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Library/base/utils/dataframe.vb

+12
Original file line numberDiff line numberDiff line change
@@ -834,7 +834,19 @@ ReturnTable:
834834
frame = DirectCast(cast, FeatureFrame)
835835
End If
836836
ElseIf TypeOf x Is vec OrElse x.GetType.IsArray Then
837+
Dim source = CLRVector.asObject(x).TryCastGenericArray(env)
837838

839+
If TypeOf source Is Message Then
840+
Return source
841+
End If
842+
843+
Dim type As Type = source _
844+
.GetType _
845+
.GetElementType
846+
847+
frame = CLRVector.asObject(source).StreamToFrame(type)
848+
Else
849+
Return RInternal.debug.stop($"unsure how to cast object with type '{x.GetType.FullName}' to dataframe", env)
838850
End If
839851

840852
Call frame.WriteFrame(s)

0 commit comments

Comments
 (0)