Open HaleySchuhl opened 1 month ago
I think that's a great idea! When I added that function, I didn't have a ton of experience using the rest of plantcv, so it wasn't on purpose that it kind of breaks the convention. There's nothing about it that means it couldn't use the image instead of path, but allowing it to accept either wouldn't hurt, so I have no strong feelings either way.
Start a discussion about anything you would like Throughout PlantCV we use
img
as a parameter input name when the function takes numpy array data, andfilepath
when the function takes a path. Currentlyplantcv.kmeans_classifier.predict_kmeans(img, model_path="./kmeansout.fit", patch_size=10)
is expecting a path for theimg
parameter.I propose we update the behavior of this function, keep the parameter name the name, and just require users to read the image in upstream. Happy medium might be to just extend the functionality to accept both types of input, @k034b363 thoughts?