ajhynes7/scikit-spatial

Best fit plane

sangelovich opened this issue · 3 comments

I have a large point cloud that and i want to create a best fit plane however i'm running out of memory.

https://stackoverflow.com/questions/19743525/is-there-a-way-to-prevent-numpy-linalg-svd-running-out-of-memory

In plane.py can an update be made to the API to allow for the option of using a reduced form of the matrix?

I have made a local update below to get around the memor error for the moment.
u, _, _ = np.linalg.svd(points_centered.T, full_matrices=False)

Hi @sangelovich, I've modified Plane.best_fit and Line.best_fit to take kwargs as input and pass them to np.linalg.svd. Does that solve your problem? If so I can make a new release.

@ajhynes7 Yes. Sorry for the slow reply I was out for the holidays.

@sangelovich Ok, the new release (5.2.0) has this feature, so I'll close the issue.