Attempting to set the matrix directly fails
cvolpe opened this issue · comments
With "ms" as a MeshSet, I call the following code:
ned2enu = np.array([[0,1,0,0], [1,0,0,0], [0,0,-1,0], [0,0,0,1]])
ms.set_matrix(ned2enu)
When I do that, the traceback ends with this:
File "D:\Volpe\TestProject\main.py", line 46, in parse_glb
ms.set_matrix(ned2enu)
TypeError: foo() takes 1 positional argument but 2 were given
Note that "foo()" is not something that I have defined.
Any idea what's going on here?
You need to give the name of the parameter in the call of set_matrix
:
https://pymeshlab.readthedocs.io/en/latest/filter_list.html#filter-documentation
You need to give the name of the parameter in the call of
set_matrix
: https://pymeshlab.readthedocs.io/en/latest/filter_list.html#filter-documentation
Oh, thanks. I'm a bit of a Python newbie here. I thought the parameters could be supplied positionally if I specified them in order and accepted the default for anything not specified. I didn't realize specifying them as keyword args was mandatory.