MAINT: Deprecate rank in favor of np.linalg.matrix_rank #1383

Merged
merged 3 commits into from Apr 3, 2014

Projects

None yet

3 participants

@jseabold
Member

No description provided.

@argriffing argriffing and 1 other commented on an outdated diff Feb 11, 2014
statsmodels/genmod/generalized_linear_model.py
@@ -18,9 +18,8 @@
Chapman & Hall, Boca Rotan.
"""
-import numpy as np
+import numpy as npmatrix_
@jseabold
jseabold Feb 11, 2014 Member

yeesh must've slipped on my keyboard. thanks

@jseabold
Member

I don't see these failures locally. I'll try to install 1.6.1 locally. I assume matrix_rank is available in our minimum numpy.

@josef-pkt
Member

matrix_rank is available in numpy 1.6, but at some point Matthews change the defaults for the threshold. I don't remember if this happened after 1.6, but I think so.
(I have problems looking at TravisCI because I'm using internet explorer.)

@jseabold
Member

Is 1.6 our minimum version? We list 1.5 on the web...

@argriffing

Looks like its behavior changed in 1.7 or 1.8 numpy/numpy@78b7693

@jseabold
Member

Thanks. I can replicate one of these failures with 1.6.0. Odd. So I guess this PR is a non-starter? Is it worth writing a wrapper to adjust the tolerance?

@argriffing

The current numpy matrix_rank implementation could be copypasted into statsmodels, with the intention that it would be deleted when the required numpy version reaches 1.7

@jseabold
Member

We'll see if that works.

@argriffing

if numpy 1.10 is released this will break everyone's version string comparisons ('1.10' < '1.8' < '1.9')

@jseabold
Member

Yeah we need to switch to LooseVersion. I was going to do it in another PR.

@argriffing

Apparently LooseVersion doesn't work for all of the alpha, beta, release candidate, development versions, etc. that are used by numpy and scipy, so this was recently written.

@jseabold
Member

Ah, thanks for the pointer, I hadn't seen that.

@josef-pkt josef-pkt added the PR label Feb 19, 2014
@jseabold jseabold merged commit 29a3bce into statsmodels:master Apr 3, 2014

1 check passed

continuous-integration/travis-ci The Travis CI build passed
Details
@jseabold jseabold deleted the jseabold:deprecate-rank branch Apr 3, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment