remove numpy build dependency
maxbachmann opened this issue · comments
numpy is currently required as build time dependency for cdist. This leads to a lot of issues, which would be fairly simple to avoid by using numpy only in Python:
def cdist(...)
import numpy as np
result = cdist_cpp(...)
return np.asarray(result)
as long as the result of cdist_cpp
follows the buffer protocol, this wouldn't require a copy of the matrix. Since cdist is run with many elements the overhead of this Python wrapper becomes irrelevant. In addition this makes this change backwards compatible.