Commit bc7f8779 authored by Jonathan Neuhauser's avatar Jonathan Neuhauser

fix deprecation warnings for numpy.matrix

parent 90d172ff
......@@ -237,7 +237,7 @@ class WavefrontObj(object):
"""translate vertex points according to the matrix"""
transformed_pts = []
for vtx in self.vtx:
transformed_pts.append((numpy.matmul(trans_mat, numpy.mat(vtx).T)).T.tolist()[0])
transformed_pts.append((numpy.matmul(trans_mat, numpy.array(vtx).T)).T.tolist())
return transformed_pts
def get_edge_list(self):
......@@ -312,7 +312,7 @@ class Poly3D(inkex.GenerateExtension):
poly.transform.add_scale(scale)
# TRANSFORMATION OF THE OBJECT (ROTATION, SCALE, ETC)
trans_mat = numpy.mat(numpy.identity(3, float)) # init. trans matrix as identity matrix
trans_mat = numpy.identity(3, float) # init. trans matrix as identity matrix
for i in range(1, 7): # for each rotation
axis = getattr(so, 'r{}_ax'.format(i))
angle = getattr(so, 'r{}_ang'.format(i)) * pi / 180
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment