Skip to content

Commit

Permalink
XXX revert test, implement WA
Browse files Browse the repository at this point in the history
  • Loading branch information
skirpichev committed Jan 25, 2021
1 parent cb20a98 commit 4503db1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions diofant/tests/vector/test_coordsysrect.py
Expand Up @@ -140,13 +140,13 @@ def test_coordinate_vars():
mapping = A.scalar_map(C)
assert mapping[A.x] == (C.x*(2*cos(q) + 1)/3 +
C.y*(-2*sin(q + pi/6) + 1)/3 +
C.z*(-2*cos(q + pi/3) + 1)/3).doit()
C.z*(-2*cos(q + pi/3) + 1)/3)
assert mapping[A.y] == (C.x*(-2*cos(q + pi/3) + 1)/3 +
C.y*(2*cos(q) + 1)/3 +
C.z*(-2*sin(q + pi/6) + 1)/3).doit()
C.z*(-2*sin(q + pi/6) + 1)/3)
assert mapping[A.z] == (C.x*(-2*sin(q + pi/6) + 1)/3 +
C.y*(-2*cos(q + pi/3) + 1)/3 +
C.z*(2*cos(q) + 1)/3).doit()
C.z*(2*cos(q) + 1)/3)
D = A.locate_new('D', a*A.i + b*A.j + c*A.k)
assert D.scalar_map(A) == {D.z: A.z - c, D.x: A.x - a, D.y: A.y - b}
E = A.orient_new_axis('E', a, A.k, a*A.i + b*A.j + c*A.k)
Expand Down
4 changes: 2 additions & 2 deletions diofant/vector/coordsysrect.py
Expand Up @@ -305,7 +305,7 @@ def scalar_map(self, other):
ImmutableMatrix(relocated_scalars))
mapping = {}
for i, x in enumerate(self.base_scalars()):
mapping[x] = trigsimp(vars_matrix[i])
mapping[x] = trigsimp(vars_matrix[i]).doit()
return mapping

def locate_new(self, name, position, vector_names=None,
Expand Down Expand Up @@ -422,7 +422,7 @@ def orient_new(self, name, orienters, location=None,
else:
final_matrix *= orienter.rotation_matrix()

return CoordSysCartesian(name, rotation_matrix=final_matrix,
return CoordSysCartesian(name, rotation_matrix=final_matrix.doit(),
vector_names=vector_names,
variable_names=variable_names,
location=location,
Expand Down

0 comments on commit 4503db1

Please sign in to comment.