def __init__()

in bindings/jupyter/mlvis/widget_ext/Manifold.py [0:0]


    def __init__(self, props={}):
        if 'data' not in props:
            raise Exception('data must be specified')

        data = props['data']

        valid, exception = self.validate_data(data, give_exception=True)
        if not valid:
            if isinstance(exception, Warning):
                warnings.warn(exception)
            else:
                raise exception

        # make a shallow copy of the props,
        # props are shared with the manifold instance, clone to prevent unexpected changes
        processed_props = props.copy()
        processed_props['data']['x'] = self.process_x(data['x'])
        processed_props['data']['yPred'] = self.process_y_pred(data['yPred'])
        processed_props['data']['yTrue'] = self.process_y_true(data['yTrue'])
        super(Manifold, self).__init__(processed_props)