-
Notifications
You must be signed in to change notification settings - Fork 44
addition of wrapper for mb03rd #73
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
Conversation
I haven't looked at the test cases in detail, but otherwise this looks fine to me. We can wait a few days to see if anyone will look over the test cases, otherwise go ahead and merge. I think I'll mark all the OSX builds as being allowed to fail; they're unfortunately not currently useful :(. I'll open an issue for that. |
How about testing for jobx='N' as well? It calls a different wrapper function and has a different return structure. |
I haven't been able to locate a meaningful test case for that yet. Will try to do some more digging for that, any pointers are appreciated. |
Shouldn't this go into |
@@ -528,3 +528,40 @@ subroutine tg01fd_uu(compq,compz,joba,l,n,m,p,a,lda,e,lde,b,ldb,c,ldc,q,ldq,z,ld | |||
integer required intent(in) :: ldwork | |||
integer intent(out) :: info | |||
end subroutine tg01fd_uu | |||
subroutine mb03rd_n(jobx,sort,n,pmax,a,lda,x,ldx,nblcks,blsize,wr,wi,tol,dwork,info) ! in MB03RD.f |
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.
It may be just my personal opinion, but I don't think it is a good idea to introduce a specific wrapper for different job options with different parameter and return signatures when there is no use case and no unit test for it. Why not just keep one wrapper for the function, test that with the default job='U'
and deal with 'N' as soon as it becomes relevant?
If JOBX = 'N', this array is not referenced, and not returned | ||
blksize : output rank-1 array('i') with bounds (n) | ||
The orders of the resulting diagonal blocks of the matrix Ar. | ||
W : output rank-1 array('c') size (n) |
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.
Does not fit the variable names in the call signature blcks
,EIG
@@ -1353,4 +1353,110 @@ def tg01fd(l,n,m,p,A,E,B,C,Q=None,Z=None,compq='N',compz='N',joba='N',tol=0.0,ld | |||
|
|||
return A,E,B,C,ranke,rnka22,Q,Z | |||
|
|||
def mb03rd(n,A,X=None,jobx='U',sort='N',pmax=1.0,tol=0.0): | |||
""" A,X,blcks,EIG = mb03rd(n,A,[X,job,sort,pmax,tol]) -- if jobx='U' |
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.
Actually returns _,_,_,Wr,Wi
not one EIG
. Would suggest converting to complex array as in #88
@@ -1353,4 +1353,110 @@ def tg01fd(l,n,m,p,A,E,B,C,Q=None,Z=None,compq='N',compz='N',joba='N',tol=0.0,ld | |||
|
|||
return A,E,B,C,ranke,rnka22,Q,Z | |||
|
|||
def mb03rd(n,A,X=None,jobx='U',sort='N',pmax=1.0,tol=0.0): |
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.
Belongs into math.py
@@ -528,3 +528,40 @@ subroutine tg01fd_uu(compq,compz,joba,l,n,m,p,a,lda,e,lde,b,ldb,c,ldc,q,ldq,z,ld | |||
integer required intent(in) :: ldwork | |||
integer intent(out) :: info | |||
end subroutine tg01fd_uu | |||
subroutine mb03rd_n(jobx,sort,n,pmax,a,lda,x,ldx,nblcks,blsize,wr,wi,tol,dwork,info) ! in MB03RD.f |
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.
Move to math.pyf?
@@ -150,12 +150,12 @@ script: | |||
# Local unit tests | |||
# TODO: replace with nose? | |||
- cd .. | |||
# Additional packages required for testing | |||
- conda install scipy matplotlib |
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.
adressed in #93
A, X = schur(test1_A) | ||
Ah, Xh = np.copy(A), np.copy(X) | ||
# on this basis, get the transform | ||
Ar, Xr, blks, eig = transform.mb03rd( |
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.
Assert correct eig
as well (complex?)
Based on PR python-control#73 by @repagh Moved from transform to math single wrapper for all jobx parameter valies docstring in numpydoc (python-control#100) run all jobx and sort parameter values in test check the returned complex eigenvalues in test
Based on PR python-control#73 by @repagh Moved from transform to math single wrapper for all jobx parameter valies docstring in numpydoc (python-control#100) run all jobx and sort parameter values in test check the returned complex eigenvalues in test
Based on PR python-control#73 by @repagh Moved from transform to math single wrapper for all jobx parameter valies docstring in numpydoc (python-control#100) run all jobx and sort parameter values in test check the returned complex eigenvalues in test
Based on PR python-control#73 by @repagh Moved from transform to math single wrapper for all jobx parameter valies docstring in numpydoc (python-control#100) run all jobx and sort parameter values in test check the returned complex eigenvalues in test
Superseded by #116 |
as requested in python-control list