Rotate method of AmpObject requires numpy array
Issue: Currently the rotate method only works with np arrays, but the documentation says only array-like
To reproduce run the following code:
from AmpScan.core import AmpObject
import numpy as np
stl_path = self.get_path("stl_file.stl")
amp = AmpObject(stl_path)
m = [[1, 0, 0], [0, np.sqrt(3)/2, 1/2], [0, -1/2, np.sqrt(3)/2]]
amp.rigidTransform(R=m, T=[1, 0, -1])
Error:
Traceback (most recent call last): File "C:\Users\Jack\PycharmProjects\AmpScan2\tests\core_tests.py", line 107, in test_rigid_transform self.amp.rigidTransform(R=m, T=[1, 0, -1]) File "C:\Users\Jack\PycharmProjects\AmpScan2\AmpScan\core.py", line 393, in rigidTransform self.rotate(R, True) File "C:\Users\Jack\PycharmProjects\AmpScan2\AmpScan\core.py", line 371, in rotate self.vert[:, :] = np.dot(self.vert, R.T) AttributeError: 'list' object has no attribute 'T'