dolphindb 2.0.1015 → 2.0.1017

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/docs.en.json CHANGED
@@ -60609,12 +60609,14 @@
60609
60609
  {
60610
60610
  "title": "Arguments",
60611
60611
  "type": "parameters",
60612
+ "children": []
60613
+ },
60614
+ {
60615
+ "title": "Note",
60612
60616
  "children": [
60613
60617
  {
60614
60618
  "type": "text",
60615
60619
  "value": [
60616
- "`func` is an aggregate function.",
60617
- "",
60618
60620
  "`funcArgs` are the parameters of `func`. They can be vectors/dictionaries/tables. It is a tuple if there are more than one parameter of `func`, and all parameters must have the same size.",
60619
60621
  "",
60620
60622
  "`window` is the moving window size.",
@@ -94110,8 +94112,10 @@
94110
94112
  {
94111
94113
  "type": "text",
94112
94114
  "value": [
94113
- "..当 args 的前几个元素为 NULL 时,DolphinDB 内置滑动窗口函数与 python TA-lib 的处理方式不同:",
94115
+ "Regarding the NULL value handling, the differences between DolphinDB's built-in moving functions and Python TA-lib lie in:",
94114
94116
  "",
94117
+ "- DolphinDB moving functions: The calculation in the sliding window starts from the first element.",
94118
+ "- Python TA-lib: Keep the NULL values at the beginning of data in the output. The calculation in the sliding window starts from the first non-NULL value.",
94115
94119
  "",
94116
94120
  "To process data starting with consecutive NULL values in the same way as Python TA-Lib, you can call DolphinDB built-in functions with the higher-order function ``talib``. "
94117
94121
  ]
package/docs.zh.json CHANGED
@@ -63844,12 +63844,14 @@
63844
63844
  {
63845
63845
  "title": "参数",
63846
63846
  "type": "parameters",
63847
+ "children": []
63848
+ },
63849
+ {
63850
+ "title": "注意",
63847
63851
  "children": [
63848
63852
  {
63849
63853
  "type": "text",
63850
63854
  "value": [
63851
- "`func` 是一个聚合函数。",
63852
- "",
63853
63855
  "`funcArgs` 是函数func的参数。可为向量、字典或表。如果有多个参数,则用元组表示,并且每个参数的长度(向量/字典的元素个数或表的行数)必须相同。",
63854
63856
  "",
63855
63857
  "`window` 是正整型 或 DURATION 标量。",
@@ -63874,7 +63876,7 @@
63874
63876
  "value": [
63875
63877
  "应用函数/运算符到给定对象的一个滚动窗口上。",
63876
63878
  "",
63877
- "``moving`` 高阶函数总是返回一个向量,长度与输入参数的长度相同。当第一个滑动窗口出现时高阶函数开始计算,然后每计算一次,滑动窗口向右移动一个元素。",
63879
+ "``moving`` 高阶函数总是返回一个向量,长度与输入参数的长度相同。当第一个滑动窗口出现时高阶函数开始计算,每计算一次,滑动窗口向右移动一个元素。",
63878
63880
  "",
63879
63881
  "内置函数 :doc:`/FunctionsandCommands/FunctionReferences/m/msum`, :doc:`/FunctionsandCommands/FunctionReferences/m/mcount` 和 :doc:`/FunctionsandCommands/FunctionReferences/m/mavg` 为各自的计算场景进行了优化,因此比 ``moving`` 高阶函数有更好的性能。"
63880
63882
  ]
@@ -88965,7 +88967,7 @@
88965
88967
  {
88966
88968
  "type": "text",
88967
88969
  "value": [
88968
- "`memSize` 一个数值型标量,且必须大于0且小于 *maxMemSize* * 0.75。"
88970
+ "`memSize` 一个数值型标量,且必须大于0且小于 *maxMemSize* * 0.75。单位为 GB。"
88969
88971
  ]
88970
88972
  }
88971
88973
  ]
package/index.js CHANGED
@@ -2034,7 +2034,7 @@ export function nanotimestamp2str(nanotimestamp, format = 'YYYY.MM.DD HH:mm:ss.S
2034
2034
  assert(i_nanosecond_start !== -1, t('格式串必须包含纳秒的格式 (SSSSSSSSS)'));
2035
2035
  const remainder = nanotimestamp % 1000000000n;
2036
2036
  const borrow = remainder < 0n;
2037
- const ms = Number(nanotimestamp / 1000000n);
2037
+ const ms = Number((nanotimestamp - remainder + (borrow ? -1000000000n : 0n)) / 1000000n);
2038
2038
  return (dayjs(_datetime_formatter.format(new Date(ms))).format(format.slice(0, i_second_end)) +
2039
2039
  format.slice(i_second_end, i_nanosecond_start) +
2040
2040
  String(borrow ?