Skip to content

Commit

Permalink
fix: retain frame ID in vectorspace operations
Browse files Browse the repository at this point in the history
  • Loading branch information
CallumJHays committed Oct 10, 2022
1 parent 2592392 commit b4108e3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions mathpad/vector_space.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,31 +143,31 @@ def __truediv__(self, other: Val) -> 'VectorSpace':
self,
other,
lambda a, b: a / b,
f"Unknown{len(self)}D"
self.name
)

def __rtruediv__(self, other: Val) -> 'VectorSpace':
return VectorSpace._get_output_space(
other,
self,
lambda a, b: a / b,
f"Unknown{len(self)}D"
self.name
)

def __mul__(self, other: Val) -> 'VectorSpace':
return VectorSpace._get_output_space(
self,
other,
lambda a, b: a * b,
f"Unknown{len(self)}D"
self.name
)

def __rmul__(self, other: Val) -> 'VectorSpace':
return VectorSpace._get_output_space(
other,
self,
lambda a, b: a * b,
f"Unknown{len(self)}D"
self.name
)

VectorSpaceT = TypeVar("VectorSpaceT", bound=VectorSpace)
Expand Down

0 comments on commit b4108e3

Please # to comment.