Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions spatialmath/quaternion.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ def vec_xyzs(self):
:return: quaternion expressed as a 4-vector
:rtype: numpy ndarray, shape=(4,)

``q.vec`` is the quaternion as a vector. If `len(q)` is:
``q.vec_xyzs`` is the quaternion as a vector. If `len(q)` is:

- 1, return a NumPy array shape=(4,)
- N>1, return a NumPy array shape=(N,4).
Expand All @@ -258,9 +258,9 @@ def vec_xyzs(self):
>>> Quaternion([np.r_[1,2,3,4], np.r_[5,6,7,8]]).vec_xyzs
"""
if len(self) == 1:
return self._A
return np.roll(self._A, -1)
else:
return np.array([q._A for q in self])
return np.array([np.roll(q._A, -1) for q in self])

@property
def matrix(self):
Expand Down