34
34
35
35
# GH10447
36
36
37
+
37
38
def test_complex_fixed (setup_path ):
38
39
df = DataFrame (
39
40
np .random .rand (4 , 5 ).astype (np .complex64 ),
@@ -56,6 +57,7 @@ def test_complex_fixed(setup_path):
56
57
reread = read_hdf (path , "df" )
57
58
assert_frame_equal (df , reread )
58
59
60
+
59
61
def test_complex_table (setup_path ):
60
62
df = DataFrame (
61
63
np .random .rand (4 , 5 ).astype (np .complex64 ),
@@ -79,6 +81,7 @@ def test_complex_table(setup_path):
79
81
reread = read_hdf (path , "df" )
80
82
assert_frame_equal (df , reread )
81
83
84
+
82
85
@xfail_non_writeable
83
86
def test_complex_mixed_fixed (setup_path ):
84
87
complex64 = np .array (
@@ -102,6 +105,7 @@ def test_complex_mixed_fixed(setup_path):
102
105
reread = read_hdf (path , "df" )
103
106
assert_frame_equal (df , reread )
104
107
108
+
105
109
def test_complex_mixed_table (setup_path ):
106
110
complex64 = np .array (
107
111
[1.0 + 1.0j , 1.0 + 1.0j , 1.0 + 1.0j , 1.0 + 1.0j ], dtype = np .complex64
@@ -130,6 +134,7 @@ def test_complex_mixed_table(setup_path):
130
134
reread = read_hdf (path , "df" )
131
135
assert_frame_equal (df , reread )
132
136
137
+
133
138
def test_complex_across_dimensions_fixed (setup_path ):
134
139
with catch_warnings (record = True ):
135
140
complex128 = np .array ([1.0 + 1.0j , 1.0 + 1.0j , 1.0 + 1.0j , 1.0 + 1.0j ])
@@ -144,6 +149,7 @@ def test_complex_across_dimensions_fixed(setup_path):
144
149
reread = read_hdf (path , "obj" )
145
150
comp (obj , reread )
146
151
152
+
147
153
def test_complex_across_dimensions (setup_path ):
148
154
complex128 = np .array ([1.0 + 1.0j , 1.0 + 1.0j , 1.0 + 1.0j , 1.0 + 1.0j ])
149
155
s = Series (complex128 , index = list ("abcd" ))
@@ -159,6 +165,7 @@ def test_complex_across_dimensions(setup_path):
159
165
reread = read_hdf (path , "obj" )
160
166
comp (obj , reread )
161
167
168
+
162
169
def test_complex_indexing_error (setup_path ):
163
170
complex128 = np .array (
164
171
[1.0 + 1.0j , 1.0 + 1.0j , 1.0 + 1.0j , 1.0 + 1.0j ], dtype = np .complex128
@@ -171,6 +178,7 @@ def test_complex_indexing_error(setup_path):
171
178
with pytest .raises (TypeError ):
172
179
store .append ("df" , df , data_columns = ["C" ])
173
180
181
+
174
182
def test_complex_series_error (setup_path ):
175
183
complex128 = np .array ([1.0 + 1.0j , 1.0 + 1.0j , 1.0 + 1.0j , 1.0 + 1.0j ])
176
184
s = Series (complex128 , index = list ("abcd" ))
@@ -184,6 +192,7 @@ def test_complex_series_error(setup_path):
184
192
reread = read_hdf (path , "obj" )
185
193
tm .assert_series_equal (s , reread )
186
194
195
+
187
196
def test_complex_append (setup_path ):
188
197
df = DataFrame (
189
198
{"a" : np .random .randn (100 ).astype (np .complex128 ), "b" : np .random .randn (100 )}
0 commit comments