From f8f1c9d229829d36a977b176262d41079c5d02a6 Mon Sep 17 00:00:00 2001 From: Haonan Date: Mon, 17 Jun 2024 21:46:55 +0800 Subject: [PATCH] Fix python CI (#12754) --- .../client-py/iotdb/utils/IoTDBRpcDataSet.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/iotdb-client/client-py/iotdb/utils/IoTDBRpcDataSet.py b/iotdb-client/client-py/iotdb/utils/IoTDBRpcDataSet.py index 53ef09b8e7aa..eb859d7d30c1 100644 --- a/iotdb-client/client-py/iotdb/utils/IoTDBRpcDataSet.py +++ b/iotdb-client/client-py/iotdb/utils/IoTDBRpcDataSet.py @@ -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): @@ -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 @@ -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) @@ -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: