Skip to content

MINOR: add rcond parameter to use future precise numpy default - #17

Merged
cboulay merged 1 commit into
sccn:masterfrom
sappelhoff:fix_linalg_lstsq_future
Jun 12, 2018
Merged

cboulay merged 1 commit into
sccn:masterfrom
sappelhoff:fix_linalg_lstsq_future

Conversation

@sappelhoff

Copy link
Copy Markdown
Contributor

np.linalg.lstsq currently elicits a Future Warning:

FutureWarning: `rcond` parameter will change to the default of machine precision times
 ``max(M, N)`` where M and N are the input matrix dimensions.
To use the future default and silence this warning we 
advise to pass `rcond=None`, to keep using the old, explicitly pass `rcond=-1`.
  mapping = np.linalg.lstsq(X, y)[0]

In this PR, I set the rcond parameter to rcond=None... to adopt the future Numpy default for this line:

mapping = np.linalg.lstsq(X, y)[0]

If we want to keep the old behavior, we should set rcond=-1. However, using the future default is probably better. See also here.

@cboulay
cboulay merged commit 26e8925 into sccn:master Jun 12, 2018
@cboulay

cboulay commented Jun 12, 2018

Copy link
Copy Markdown
Collaborator

Thanks, and sorry for taking so long to get to this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants