Skip to content
Snippets Groups Projects
Commit 499f3d91 authored by Joseph Weston's avatar Joseph Weston
Browse files

use lstsq with explicit parameters in preparation for numpy v1.14

This was forgotten in !199.
parent ec9d0fca
No related branches found
No related tags found
No related merge requests found
......@@ -142,7 +142,9 @@ def cvp(vec, basis, n=1):
if basis.ndim != 2:
raise ValueError('`basis` must be a 2d array-like object.')
vec = np.asarray(vec)
center_coords = np.array(np.round(np.linalg.lstsq(basis.T, vec)[0]), int)
# TODO: change to rcond=None once we depend on numpy >= 1.14.
center_coords = np.linalg.lstsq(basis.T, vec, rcond=-1)[0]
center_coords = np.array(np.round(center_coords), int)
# Cutoff radius for n-th nearest neighbor.
rad = 1
nth_dist = np.inf
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment