Skip to content

Commit

Permalink
remove _value
Browse files Browse the repository at this point in the history
  • Loading branch information
lin-hitonami committed Feb 16, 2022
1 parent 8adb90e commit 057abea
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions python/taichi/lang/matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,11 +332,6 @@ def z(self, value):
def w(self, value):
self[3] = value

@property
@python_scope
def _value(self):
return Matrix(self.to_list())

def to_list(self):
return [[self(i, j) for j in range(self.m)] for i in range(self.n)]

Expand Down Expand Up @@ -670,7 +665,7 @@ def to_numpy(self, keep_dims=False):
"""
as_vector = self.m == 1 and not keep_dims
shape_ext = (self.n, ) if as_vector else (self.n, self.m)
return np.array(self._value).reshape(shape_ext)
return np.array(self.to_list()).reshape(shape_ext)

@taichi_scope
def __ti_repr__(self):
Expand Down

0 comments on commit 057abea

Please sign in to comment.