Skip to content

Commit

Permalink
Fix python CI (#12754)
Browse files Browse the repository at this point in the history
  • Loading branch information
HTHou committed Jun 27, 2024
1 parent b9ed80b commit 5f79351
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions iotdb-client/client-py/iotdb/utils/IoTDBRpcDataSet.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def construct_one_data_frame(self):
self.__query_data_set.time, np.dtype(np.longlong).newbyteorder(">")
)
if time_array.dtype.byteorder == ">":
time_array = time_array.byteswap().newbyteorder("<")
time_array = time_array.byteswap().view(time_array.dtype.newbyteorder("<"))
result[0] = time_array
total_length = len(time_array)
for i in range(self.column_size):
Expand Down Expand Up @@ -205,7 +205,9 @@ def construct_one_data_frame(self):
else:
raise RuntimeError("unsupported data type {}.".format(data_type))
if data_array.dtype.byteorder == ">":
data_array = data_array.byteswap().newbyteorder("<")
data_array = data_array.byteswap().view(
data_array.dtype.newbyteorder("<")
)
# self.__query_data_set.valueList[location] = None
if len(data_array) < total_length:
# INT32 or INT64 or boolean
Expand Down Expand Up @@ -258,7 +260,9 @@ def resultset_to_pandas(self):
self.__query_data_set.time, np.dtype(np.longlong).newbyteorder(">")
)
if time_array.dtype.byteorder == ">":
time_array = time_array.byteswap().newbyteorder("<")
time_array = time_array.byteswap().view(
time_array.dtype.newbyteorder("<")
)
if self.ignore_timestamp is None or self.ignore_timestamp is False:
result[IoTDBRpcDataSet.TIMESTAMP_STR].append(time_array)

Expand Down Expand Up @@ -317,7 +321,9 @@ def resultset_to_pandas(self):
else:
raise RuntimeError("unsupported data type {}.".format(data_type))
if data_array.dtype.byteorder == ">":
data_array = data_array.byteswap().newbyteorder("<")
data_array = data_array.byteswap().view(
data_array.dtype.newbyteorder("<")
)
self.__query_data_set.valueList[location] = None
tmp_array = []
if len(data_array) < total_length:
Expand Down

0 comments on commit 5f79351

Please sign in to comment.