From 53bddaa1f98ced58b1dba6b493b145e463f005e8 Mon Sep 17 00:00:00 2001 From: Yi Xu Date: Thu, 3 Nov 2022 15:56:49 +0800 Subject: [PATCH] Update python/taichi/lang/matrix_ops_utils.py Co-authored-by: Zhanlue Yang --- python/taichi/lang/matrix_ops_utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python/taichi/lang/matrix_ops_utils.py b/python/taichi/lang/matrix_ops_utils.py index 5626d218c6053..3dd7e067ec0e2 100644 --- a/python/taichi/lang/matrix_ops_utils.py +++ b/python/taichi/lang/matrix_ops_utils.py @@ -75,6 +75,8 @@ def assert_tensor(m, msg='not tensor type: {}'): raise TaichiCompilationError(msg.format(type(m))) +# TODO(zhanlue): rearrange to more generic checker functions +# for example: "assert_is_instance(args, indices=[], instances=[], logic='or')" def assert_vector(v, msg='not a vector: {}'): if (isinstance(v, Expr) or isinstance(v, Matrix)) and len( v.get_shape()) == 1: