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

qiaojialin pushed a commit to branch rel/0.13
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/rel/0.13 by this push:
     new 6f479ceb82 [To rel/0.13][IOTDB-3801] Update doc about python numpy 
tablet (#6864)
6f479ceb82 is described below

commit 6f479ceb825db392f7ad99bedc12c3cc94e1fad3
Author: Haonan <[email protected]>
AuthorDate: Thu Aug 11 15:04:03 2022 +0800

    [To rel/0.13][IOTDB-3801] Update doc about python numpy tablet (#6864)
---
 client-py/README.md                                    | 1 +
 docs/UserGuide/API/Programming-Python-Native-API.md    | 3 ++-
 docs/zh/UserGuide/API/Programming-Python-Native-API.md | 5 +++--
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/client-py/README.md b/client-py/README.md
index 41c0a113b8..52b5426718 100644
--- a/client-py/README.md
+++ b/client-py/README.md
@@ -187,6 +187,7 @@ With less memory footprint and time cost of serialization, 
the insert performanc
 (if not, the default dtypes are also ok).
 
 ```python
+import numpy as np
 data_types_ = [
     TSDataType.BOOLEAN,
     TSDataType.INT32,
diff --git a/docs/UserGuide/API/Programming-Python-Native-API.md 
b/docs/UserGuide/API/Programming-Python-Native-API.md
index fc5e80c161..4c4ee5e9c6 100644
--- a/docs/UserGuide/API/Programming-Python-Native-API.md
+++ b/docs/UserGuide/API/Programming-Python-Native-API.md
@@ -167,6 +167,7 @@ With less memory footprint and time cost of serialization, 
the insert performanc
    (if not, the default dtypes are also ok).
 
 ```python
+import numpy as np
 data_types_ = [
     TSDataType.BOOLEAN,
     TSDataType.INT32,
@@ -181,7 +182,7 @@ np_values_ = [
     np.array([11, 11111, 1, 0], TSDataType.INT64.np_dtype()),
     np.array([1.1, 1.25, 188.1, 0], TSDataType.FLOAT.np_dtype()),
     np.array([10011.1, 101.0, 688.25, 6.25], TSDataType.DOUBLE.np_dtype()),
-    np.array(["test01", "test02", "test03", "test04"], 
TSDataType.TEXT.np_dtype()),
+    np.array(["test01", "test02", "test03", "test04"]),
 ]
 np_timestamps_ = np.array([1, 2, 3, 4], TSDataType.INT64.np_dtype())
 np_tablet_ = NumpyTablet(
diff --git a/docs/zh/UserGuide/API/Programming-Python-Native-API.md 
b/docs/zh/UserGuide/API/Programming-Python-Native-API.md
index d15bb830e2..f2872477d9 100644
--- a/docs/zh/UserGuide/API/Programming-Python-Native-API.md
+++ b/docs/zh/UserGuide/API/Programming-Python-Native-API.md
@@ -163,9 +163,10 @@ session.insert_tablet(tablet_)
 
 **注意**
 1. Tablet 中的每一列时间戳和值记录为一个 ndarray
-2. ndarray 推荐使用如下面例子中的特定的 dtype,如果不使用,不会影响正确性。
+2. Numpy Tablet 只支持大端类型数据,ndarray 构建时如果不指定数据类型会使用小端,因此推荐在构建 ndarray 
时指定下面例子中类型使用大端。如果不指定,IoTDB Python客户端也会进行大小端转换,不影响使用正确性。
 
 ```python
+import numpy as np
 data_types_ = [
     TSDataType.BOOLEAN,
     TSDataType.INT32,
@@ -180,7 +181,7 @@ np_values_ = [
     np.array([11, 11111, 1, 0], TSDataType.INT64.np_dtype()),
     np.array([1.1, 1.25, 188.1, 0], TSDataType.FLOAT.np_dtype()),
     np.array([10011.1, 101.0, 688.25, 6.25], TSDataType.DOUBLE.np_dtype()),
-    np.array(["test01", "test02", "test03", "test04"], 
TSDataType.TEXT.np_dtype()),
+    np.array(["test01", "test02", "test03", "test04"]),
 ]
 np_timestamps_ = np.array([1, 2, 3, 4], TSDataType.INT64.np_dtype())
 np_tablet_ = NumpyTablet(

Reply via email to