Skip to content

Commit

Permalink
Merge pull request #35 from unnonouno/fix-matrix
Browse files Browse the repository at this point in the history
Use list instead of str for initializer of matrix object
  • Loading branch information
mitmul authored Jan 13, 2017
2 parents 0a10913 + 4366095 commit fcf53af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def apply_rotate(self, image, joints, ignore_joints):
image = (image * 255).astype(np.uint8)
theta = -np.radians(angle)
c, s = np.cos(theta), np.sin(theta)
rot_mat = np.matrix('{} {}; {} {}'.format(c, -s, s, c))
rot_mat = np.matrix([[c, -s], [s, c]])
joints = rot_mat.dot((joints - joint_center).T).T + joint_center
return image, np.array(joints.tolist())

Expand Down

0 comments on commit fcf53af

Please sign in to comment.