spopt
spopt copied to clipboard
input is not sanitised before it is used
I'm not running checks on the input, nor casting input to an array in the Spanning_Tree clusterer.
@ljwolf Any update on this?
Nope. A simple "asarray" would do it I think.
@ljwolf Is this from within skater.Skater()? I can't find anything defined as Spanning_Tree within spopt. If it is, doesn't the .values property automatically convert to a numpy.array in data?:
def solve(self):
data = self.gdf
X = data[self.attrs_name].values
model = SpanningForest(**self.spanning_forest_kwds)
model.fit(
self.n_clusters,
self.w,
data=X,
quorum=self.floor,
trace=self.trace,
islands=self.islands,
)
@sjsrey Any thoughts here? This seems like it would be an easy issue to close out, but I'm not sure where it was happening before.
Using the .values is fine! I think I filed this before the new api
OK, awesome. Thanks for the feedback @ljwolf! I'll go ahead and close this then. Also, happy holidays!