From 2d2e4a0168cc5abb7b4c76359c0c15ecea790879 Mon Sep 17 00:00:00 2001 From: Manolis Papadakis Date: Tue, 20 Feb 2024 23:27:47 -0800 Subject: [PATCH 1/2] Bump Legate-Core version --- cmake/versions.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/versions.json b/cmake/versions.json index 80128714e..e19f3932f 100644 --- a/cmake/versions.json +++ b/cmake/versions.json @@ -5,7 +5,7 @@ "git_url" : "https://github.com/nv-legate/legate.core.git", "git_shallow": false, "always_download": false, - "git_tag" : "b84e86e9e3518d7102cdf531b5b733dc09c0e8d9" + "git_tag" : "0f509a007f36609d2b0bd536d8e5c54f2391b444" } } } From fe4e4c04512a66cfd2022e33d59b48e919bae6ae Mon Sep 17 00:00:00 2001 From: bryan Date: Thu, 22 Feb 2024 13:56:39 -0800 Subject: [PATCH 2/2] docs fixes --- cunumeric/module.py | 10 +++++++++- docs/cunumeric/source/api/math.rst | 1 + docs/cunumeric/source/api/statistics.rst | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/cunumeric/module.py b/cunumeric/module.py index c076200f8..e89396970 100644 --- a/cunumeric/module.py +++ b/cunumeric/module.py @@ -6255,6 +6255,7 @@ def diff( The first difference is given by ``out[i] = a[i+1] - a[i]`` along the given axis, higher differences are calculated by using `diff` recursively. + Parameters ---------- a : array_like @@ -6271,6 +6272,7 @@ def diff( arrays with length 1 in the direction of axis and the shape of the input array in along all other axes. Otherwise the dimension and shape must match `a` except along axis. + Returns ------- diff : ndarray @@ -6279,17 +6281,21 @@ def diff( type of the output is the same as the type of the difference between any two elements of `a`. This is the same as the type of `a` in most cases. + See Also -------- numpy.diff + Notes ----- Type is preserved for boolean arrays, so the result will contain - `False` when consecutive elements are the same and `True` when they + False when consecutive elements are the same and True when they differ. + For unsigned integer arrays, the results will also be unsigned. This should not be surprising, as the result is consistent with calculating the difference directly: + >>> u8_arr = np.array([1, 0], dtype=np.uint8) >>> np.diff(u8_arr) array([255], dtype=uint8) @@ -6300,8 +6306,10 @@ def diff( >>> i16_arr = u8_arr.astype(np.int16) >>> np.diff(i16_arr) array([-1], dtype=int16) + Examples -------- + >>> x = np.array([1, 2, 4, 7, 0]) >>> np.diff(x) array([ 1, 2, 3, -7]) diff --git a/docs/cunumeric/source/api/math.rst b/docs/cunumeric/source/api/math.rst index a4f71d1cf..4dd574dd7 100644 --- a/docs/cunumeric/source/api/math.rst +++ b/docs/cunumeric/source/api/math.rst @@ -55,6 +55,7 @@ Sums, products, differences .. autosummary:: :toctree: generated/ + diff prod sum cumprod diff --git a/docs/cunumeric/source/api/statistics.rst b/docs/cunumeric/source/api/statistics.rst index 48f10f19c..fe6ceb4bd 100644 --- a/docs/cunumeric/source/api/statistics.rst +++ b/docs/cunumeric/source/api/statistics.rst @@ -22,6 +22,7 @@ Histograms bincount histogram + digitize Order statistics