mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-03 16:52:39 +02:00
Update visualize stick_show for Python 3 and with clear error message for failure.
This commit is contained in:
parent
ff2eea1169
commit
74fab170d1
1 changed files with 7 additions and 1 deletions
|
|
@ -499,7 +499,13 @@ class stick_show(mocap_data_show):
|
|||
super(stick_show, self).__init__(vals, axes=axes, connect=connect)
|
||||
|
||||
def process_values(self):
|
||||
self.vals = self.vals.reshape((3, self.vals.shape[1]//3)).T
|
||||
"""Convert vector of values into a matrix for use as a 3-D point cloud."""
|
||||
try:
|
||||
self.vals = self.vals.reshape((3, self.vals.shape[1]//3)).T
|
||||
except ValueError as e:
|
||||
print('Passed values to data_show need to have a dimension which is divisible by 3 for display as they should be a point cloud of 3-D points.')
|
||||
raise(e)
|
||||
|
||||
|
||||
class skeleton_show(mocap_data_show):
|
||||
"""data_show class for visualizing motion capture data encoded as a skeleton with angles."""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue