File tree 1 file changed +7
-0
lines changed
1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -987,13 +987,16 @@ def form_blocks(data, axes):
987
987
# put "leftover" items in float bucket, where else?
988
988
# generalize?
989
989
float_dict = {}
990
+ complex_dict = {}
990
991
int_dict = {}
991
992
bool_dict = {}
992
993
object_dict = {}
993
994
datetime_dict = {}
994
995
for k , v in data .iteritems ():
995
996
if issubclass (v .dtype .type , np .floating ):
996
997
float_dict [k ] = v
998
+ elif issubclass (v .dtype .type , np .complexfloating ):
999
+ complex_dict [k ] = v
997
1000
elif issubclass (v .dtype .type , np .datetime64 ):
998
1001
datetime_dict [k ] = v
999
1002
elif issubclass (v .dtype .type , np .integer ):
@@ -1008,6 +1011,10 @@ def form_blocks(data, axes):
1008
1011
float_block = _simple_blockify (float_dict , items , np .float64 )
1009
1012
blocks .append (float_block )
1010
1013
1014
+ if len (complex_dict ):
1015
+ complex_block = _simple_blockify (complex_dict , items , np .complex64 )
1016
+ blocks .append (complex_block )
1017
+
1011
1018
if len (int_dict ):
1012
1019
int_block = _simple_blockify (int_dict , items , np .int64 )
1013
1020
blocks .append (int_block )
You can’t perform that action at this time.
0 commit comments