You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ha...@apache.org on 2022/08/02 07:19:39 UTC

[iotdb] branch IOTDB-3801 created (now 2d28014154)

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

haonan pushed a change to branch IOTDB-3801
in repository https://gitbox.apache.org/repos/asf/iotdb.git


      at 2d28014154 [IOTDB-3801] Update doc about python numpy tablet

This branch includes the following new commits:

     new 2d28014154 [IOTDB-3801] Update doc about python numpy tablet

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[iotdb] 01/01: [IOTDB-3801] Update doc about python numpy tablet

Posted by ha...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

haonan pushed a commit to branch IOTDB-3801
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit 2d28014154fbd46b292a62597fd5945239f60972
Author: HTHou <hh...@outlook.com>
AuthorDate: Tue Aug 2 15:19:07 2022 +0800

    [IOTDB-3801] Update doc about python numpy tablet
---
 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 beef55e351..3197cc7186 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 0f962ebb44..971c3ba9c4 100644
--- a/docs/UserGuide/API/Programming-Python-Native-API.md
+++ b/docs/UserGuide/API/Programming-Python-Native-API.md
@@ -165,6 +165,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,
@@ -179,7 +180,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 9f385081bd..a7d89f047f 100644
--- a/docs/zh/UserGuide/API/Programming-Python-Native-API.md
+++ b/docs/zh/UserGuide/API/Programming-Python-Native-API.md
@@ -161,9 +161,10 @@ session.insert_tablet(tablet_)
 
 **注意**
 1. Tablet 中的每一列时间戳和值记录为一个 ndarray
-2. ndarray 推荐使用如下面例子中的特定的 dtype,如果不使用,不会影响正确性。
+2. ndarray 推荐使用如下面例子中特定的 numpy.dtype,如果指定也不会影响正确性。
 
 ```python
+import numpy as np
 data_types_ = [
     TSDataType.BOOLEAN,
     TSDataType.INT32,
@@ -178,7 +179,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(