in bindings/jupyter/mlvis/widget_ext/Manifold.py [0:0]
def process_x(self, x):
"""
Convert the x data frame into the format manifold recognizes
:param x: An ndarray/list for the feature list
:return: A list for the x attribute of the data that with the manifold data format
"""
if isinstance(x, pd.DataFrame):
return x.to_dict('records')
elif isinstance(x, np.ndarray):
return x.tolist()
else:
return x