This is an automated email from the ASF dual-hosted git repository.

haonan pushed a commit to branch rc/1.3.2
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit 5f79351fd131f58c857fdcf297a01eb8ab742470
Author: Haonan <[email protected]>
AuthorDate: Mon Jun 17 21:46:55 2024 +0800

    Fix python CI (#12754)
---
 iotdb-client/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 53ef09b8e7a..eb859d7d30c 100644
--- a/iotdb-client/client-py/iotdb/utils/IoTDBRpcDataSet.py
+++ b/iotdb-client/client-py/iotdb/utils/IoTDBRpcDataSet.py
@@ -151,7 +151,7 @@ class IoTDBRpcDataSet(object):
             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 @@ class IoTDBRpcDataSet(object):
             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 @@ class IoTDBRpcDataSet(object):
                 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 @@ class IoTDBRpcDataSet(object):
                 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:

Reply via email to