From 00563696fc2f042f6dbc20d09c7e1815c54b0279 Mon Sep 17 00:00:00 2001 From: lin-hitonami Date: Wed, 26 Jan 2022 17:59:33 +0800 Subject: [PATCH] [Refactor] Remove unnecessary exposure related to matrix and mesh --- python/taichi/lang/__init__.py | 5 ++--- python/taichi/lang/matrix.py | 3 +++ python/taichi/lang/mesh.py | 3 +++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/python/taichi/lang/__init__.py b/python/taichi/lang/__init__.py index 1d3640e66b6c9..0256e0af5104a 100644 --- a/python/taichi/lang/__init__.py +++ b/python/taichi/lang/__init__.py @@ -33,11 +33,10 @@ static, static_assert, static_print, stop_grad, subscript, ti_assert, ti_float, ti_format, ti_int, ti_print, zero) -from taichi.lang.kernel_arguments import SparseMatrixProxy from taichi.lang.kernel_impl import (KernelArgError, KernelDefError, data_oriented, func, kernel, pyfunc) -from taichi.lang.matrix import Matrix, MatrixField, Vector -from taichi.lang.mesh import Mesh, MeshElementFieldProxy, TetMesh, TriMesh +from taichi.lang.matrix import * +from taichi.lang.mesh import * from taichi.lang.ops import * # pylint: disable=W0622 from taichi.lang.quant_impl import quant from taichi.lang.runtime_ops import async_flush, sync diff --git a/python/taichi/lang/matrix.py b/python/taichi/lang/matrix.py index da697fc1d7cda..001c4e226312d 100644 --- a/python/taichi/lang/matrix.py +++ b/python/taichi/lang/matrix.py @@ -1429,3 +1429,6 @@ def fill_by_kernel(self, val): def __repr__(self): return f'<{self.n} {self.layout} ti.Vector.ndarray>' + + +__all__ = ["Matrix", "Vector"] diff --git a/python/taichi/lang/mesh.py b/python/taichi/lang/mesh.py index e6790342b87c6..b999ead9429ae 100644 --- a/python/taichi/lang/mesh.py +++ b/python/taichi/lang/mesh.py @@ -528,3 +528,6 @@ def subscript(self, *indices): entry_expr.type_check() return MeshElementFieldProxy(self.mesh, self.to_element_type, entry_expr) + + +__all__ = ["Mesh", "TetMesh", "TriMesh"]