Skip to content

Commit 6476b90

Browse files
committed
fix bug in handling complex arrays, fix #3
1 parent 474f0d7 commit 6476b90

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

jdata/jdata.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ def encode(d, opt={}):
136136
newobj["_ArraySize_"] = list(d.shape)
137137
if d.dtype == np.complex64 or d.dtype == np.complex128 or d.dtype == np.csingle or d.dtype == np.cdouble:
138138
newobj["_ArrayIsComplex_"] = True
139-
newobj["_ArrayData_"] = np.stack(d.ravel().real, d.ravel().imag)
139+
newobj["_ArrayData_"] = np.stack((d.ravel().real, d.ravel().imag))
140140
else:
141141
newobj["_ArrayData_"] = d.ravel()
142142

0 commit comments

Comments
 (0)