diff --git a/python/taichi/lang/matrix.py b/python/taichi/lang/matrix.py index d3de02f9c4cbd..d94d4e8129df3 100644 --- a/python/taichi/lang/matrix.py +++ b/python/taichi/lang/matrix.py @@ -422,7 +422,9 @@ def cast(self, dtype): """ _taichi_skip_traceback = 1 - return Matrix([[ops_mod.cast(self(i, j), dtype) for j in range(self.m)] for i in range(self.n)]) + return Matrix( + [[ops_mod.cast(self(i, j), dtype) for j in range(self.m)] + for i in range(self.n)]) def trace(self): """The sum of a matrix diagonal elements. diff --git a/taichi/ir/frontend_ir.h b/taichi/ir/frontend_ir.h index 35f0ea9643e2f..b686bcc8d0f8d 100644 --- a/taichi/ir/frontend_ir.h +++ b/taichi/ir/frontend_ir.h @@ -584,7 +584,10 @@ class RangeAssumptionExpression : public Expression { const Expr &base, int low, int high) - : input(load_if_ptr(input)), base(load_if_ptr(base)), low(low), high(high) { + : input(load_if_ptr(input)), + base(load_if_ptr(base)), + low(low), + high(high) { } void type_check() override;