-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DOC: document default argument values for some arpack functions #3851
Conversation
TravisCI had two errored configurations. One failed to download dependencies, and another stalled for 10min during a test. |
@@ -1111,9 +1111,11 @@ def eigs(A, k=6, M=None, sigma=None, which='LM', v0=None, | |||
|
|||
v0 : ndarray, optional | |||
Starting vector for iteration. | |||
ncv : int, optional | |||
Default: random | |||
ncv : integer, optional |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this change, and similar ones below, aren't right. The type descriptor should use the actual type here (except if it's array_like
), so int
and not integer
. See section 4 under https://github.com/numpy/numpy/blob/master/doc/HOWTO_DOCUMENT.rst.txt#sections
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've seen both ways, so I was just guessing. Does integer
have any meaning? For example hypothetically it might be more flexible allowing int
and np.int16
and whatever else acts like an integer, whereas int
might hypothetically mean exactly Python int
type. If not then I'll change them all to int
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed this back to int, and made some more integer->int changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, integer
doesn't have an extended meaning. In a sentence in the parameter description you would use integer
(because it's a normal word) and in the type descriptor you always use int
.
@@ -1111,9 +1111,11 @@ def eigs(A, k=6, M=None, sigma=None, which='LM', v0=None, | |||
|
|||
v0 : ndarray, optional | |||
Starting vector for iteration. | |||
Default: random |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks to me like default is all zeros, not random. See v0
handling in _ArpackParams
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment for v0
in other two functions below.
Could you squash the commits after updating? |
Are you sure? I remember having thought the same thing as well, and having spent a lot of time considering this possibility, and concluding that it's actually random and not zeros. I remember having tested this by feeding a |
I didn't test, just followed the code. It seems simple enough. The only place
Feeding in EDIT: or it depends on the |
Indeed, you are right. A comment behind |
Comment in
|
Yes I spent some time tracking through the arpack maze, and I think it uses the info flag, eventually using a random initial vector. If you try to give it zeros directly, it tells you to use a more useful initial vector. |
I think I've done this. It was scary using the force flag in |
Added in the squashed commit. |
Thanks, merging. |
DOC: document default argument values for some arpack functions
closes #3829