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: