From eaa14290af0026493c7fda502138f790fbad7ca8 Mon Sep 17 00:00:00 2001 From: neozhaoliang Date: Thu, 29 Dec 2022 09:35:56 +0800 Subject: [PATCH 1/6] fix gui.circles docstring --- python/taichi/ui/gui.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/taichi/ui/gui.py b/python/taichi/ui/gui.py index ddbc99dbb047d..5ac8b74f69822 100644 --- a/python/taichi/ui/gui.py +++ b/python/taichi/ui/gui.py @@ -362,7 +362,7 @@ def circles(self, Args: pos (numpy.array): The positions of the circles. - radius (Number, optional): The radius of the circles in pixel. Default is 1. + radius (Union[Number, numpy.array], optional): The radius of the circles in pixel. Default is 1. color (int, optional): The color of the circles. Default is 0xFFFFFF. palette (list[int], optional): The List of colors from which to choose to draw. Default is None. From dcb28451529214156bd179d7b2f1b16a2a7e11a9 Mon Sep 17 00:00:00 2001 From: neozhaoliang Date: Thu, 29 Dec 2022 09:38:46 +0800 Subject: [PATCH 2/6] fix gui.circles docstring --- python/taichi/ui/canvas.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/taichi/ui/canvas.py b/python/taichi/ui/canvas.py index 8d7721d047cf7..98e1f0c67be87 100644 --- a/python/taichi/ui/canvas.py +++ b/python/taichi/ui/canvas.py @@ -111,7 +111,7 @@ def circles(self, Args: centers: a taichi 2D Vector field, where each element indicate the \ 3D location of a vertex. - radius (float): radius of the circles, relative to the height of the screen. + radius (Union[float, numpy.array]): radius of the circles in pixel. color: a global color for the triangles as 3 floats representing \ RGB values. If `per_vertex_color` is provided, this is ignored. per_vertex_color (Tuple[float]): a taichi 3D vector field, where \ From e99a6c788689aa57c2f7c2cfda7dd7e7e11a4e7f Mon Sep 17 00:00:00 2001 From: Zhao Liang Date: Tue, 3 Jan 2023 13:03:54 +0800 Subject: [PATCH 3/6] Update canvas.py --- python/taichi/ui/canvas.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python/taichi/ui/canvas.py b/python/taichi/ui/canvas.py index 98e1f0c67be87..ca51e5f39d14d 100644 --- a/python/taichi/ui/canvas.py +++ b/python/taichi/ui/canvas.py @@ -111,7 +111,9 @@ def circles(self, Args: centers: a taichi 2D Vector field, where each element indicate the \ 3D location of a vertex. - radius (Union[float, numpy.array]): radius of the circles in pixel. + radius (Union[float, numpy.array]): radius of the circles in pixels. \ + Can be either a single number, which will be applied to all circles, or a 1D NumPy array of the same length as `centers`.\ + The `i-th` item in the array will color: a global color for the triangles as 3 floats representing \ RGB values. If `per_vertex_color` is provided, this is ignored. per_vertex_color (Tuple[float]): a taichi 3D vector field, where \ From f90148353bc9063ad350b53fd2850bb181ee58ca Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 3 Jan 2023 05:04:53 +0000 Subject: [PATCH 4/6] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- python/taichi/ui/canvas.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/taichi/ui/canvas.py b/python/taichi/ui/canvas.py index ca51e5f39d14d..220fc3188f9f4 100644 --- a/python/taichi/ui/canvas.py +++ b/python/taichi/ui/canvas.py @@ -113,7 +113,7 @@ def circles(self, 3D location of a vertex. radius (Union[float, numpy.array]): radius of the circles in pixels. \ Can be either a single number, which will be applied to all circles, or a 1D NumPy array of the same length as `centers`.\ - The `i-th` item in the array will + The `i-th` item in the array will color: a global color for the triangles as 3 floats representing \ RGB values. If `per_vertex_color` is provided, this is ignored. per_vertex_color (Tuple[float]): a taichi 3D vector field, where \ From a1301607eac626e756627ef45b86e9f7ec35dd58 Mon Sep 17 00:00:00 2001 From: Zhao Liang Date: Tue, 3 Jan 2023 13:09:39 +0800 Subject: [PATCH 5/6] Update gui.py --- python/taichi/ui/gui.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python/taichi/ui/gui.py b/python/taichi/ui/gui.py index 5ac8b74f69822..a2dad1dc8d30f 100644 --- a/python/taichi/ui/gui.py +++ b/python/taichi/ui/gui.py @@ -362,7 +362,9 @@ def circles(self, Args: pos (numpy.array): The positions of the circles. - radius (Union[Number, numpy.array], optional): The radius of the circles in pixel. Default is 1. + radius (Union[Number, numpy.array], optional): The radius of the circles in pixel. \ + Can be either a number, which will be applied to all circles, or a 1D NumPy array of the same length as `pos`. \ + The default is 1. color (int, optional): The color of the circles. Default is 0xFFFFFF. palette (list[int], optional): The List of colors from which to choose to draw. Default is None. From 1c5dc65957a2949487e464980b9d0e0dcf7b254c Mon Sep 17 00:00:00 2001 From: Zhao Liang Date: Tue, 3 Jan 2023 15:21:04 +0800 Subject: [PATCH 6/6] Update canvas.py --- python/taichi/ui/canvas.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/taichi/ui/canvas.py b/python/taichi/ui/canvas.py index 220fc3188f9f4..d9e3da3689bdd 100644 --- a/python/taichi/ui/canvas.py +++ b/python/taichi/ui/canvas.py @@ -113,7 +113,7 @@ def circles(self, 3D location of a vertex. radius (Union[float, numpy.array]): radius of the circles in pixels. \ Can be either a single number, which will be applied to all circles, or a 1D NumPy array of the same length as `centers`.\ - The `i-th` item in the array will + The `i-th` item in the array will be the radius for the `i-th` circle in `centers`. color: a global color for the triangles as 3 floats representing \ RGB values. If `per_vertex_color` is provided, this is ignored. per_vertex_color (Tuple[float]): a taichi 3D vector field, where \