

def prepareShapeModel(datasetDirectory, shape):
    import glob
    datasetFiles_shape = glob.glob((((datasetDirectory + '/') + shape) + '.dat'))
    if (len(datasetFiles_shape) < 1):
        raise Exception(((('Dataset not available at ' + datasetDirectory) + ' for shape ') + shape))
    shapeModeler = ShapeModeler(filename=datasetFiles_shape[0], num_principle_components=numParams)
    return shapeModeler

dataset/ETHPy150Open chili-epfl/shape_learning/scripts/shape_model_gui.py prepareShapeModel/original