-
Notifications
You must be signed in to change notification settings - Fork 46
Open
Labels
bugSomething isn't workingSomething isn't working
Description
It is written in the docstring of the method .rotate of the class Probe that the axis is to be specified as a string:
axis : "xy" | "yz" | "xz" | None, default: None
Axis of rotation.
It must be None for 2D probes
It must be given for 3D probes
Howver, that leads to an error:
File "/home/tanguy.damart/virt_env/mozaik/lib/python3.8/site-packages/probeinterface/probe.py", line 1422, in _rotation_matrix_3d
axis = axis / np.linalg.norm(axis)
File "<__array_function__ internals>", line 180, in norm
File "/home/tanguy.damart/virt_env/mozaik/lib/python3.8/site-packages/numpy/linalg/linalg.py", line 2511, in norm
x = x.astype(float)
ValueError: could not convert string to float: 'xy'
Which hapens because the function _rotation_matrix_3d expects a list or array instead of a string:
probeinterface/src/probeinterface/probe.py
Line 1409 in 86e5fa4
axis : np.array or list |
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working