Closed ManuelZ closed 2 months ago
You are right! will be changed in version 1.8.55 to:
if not IsEmptyList(p) or not IsEmptyList(A):
if IsEmptyList(p): p=[0,0,0]
if IsEmptyList(A): A=np.eye(3)
HT = HomogeneousTransformation(A, p)
data.transform(HT)
with the new function:
def IsEmptyList(x):
if isinstance(x, list) or isinstance(x, np.ndarray):
return len(x) == 0
return False
you can change your file locally in between or convert numpy arrays to lists of lists! I will also check other places as this pops up now and then.
This happens when calling
FromSTLfile
withAoff=RotationMatrixX(theta)
, because theRotationMatrix
functions return a Numpy array and the==
operation is making Numpy compare the shapes ofAoff
and[]
, but the broadcasting rules' conditions are not met, hence the ValueError.Link
Could a potential solution be to replace
A == []
andp == []
withlen(A) == 0
andlen(p) == 0
? That worked for me.Exudyn 1.8.52.dev1.