-
Notifications
You must be signed in to change notification settings - Fork 23
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
Write API documentation for AMRClaw #150
Comments
By doing this, I can keep adding API documentations for AMRCLAW as I go through its code. |
@xinshengqin I retitled this to more accurately reflect what you seem to intend. |
@ketch Thanks! That's exactly what I mean. |
@xinshengqin: I dug up the old amrclaw docs that I mentioned the other day. There's a rendered version at http://depts.washington.edu/clawpack/amrclaw_docs/amrclaw/ A former students started this years ago from Version 4.6 and it never got finished off and has not been updated for later versions. I just added the .rst files to a branch rjleveque/amrclaw_docs_4.6 on my fork in case they are useful to you. |
@rjleveque Thanks! I just have a look at them and they definitely help. |
#157 is a good start. |
The Docathon suggested 4 different types of documentation for a project:
What we already have for clawpack are more in the range of tutorial, user documentation and galleries. The API documentation is more targeted at developers of the code.
I think source code of AMRCLAW is more like a lower level part of Clawpack, which is more likely to be read by developers. So probably I should add an API documentation category for AMRCLAW and try to make something like this for each subroutine:
Type: function
String Form:<function svd at 0x7f351c2cab90>
File: /home/shawn/.local/lib/python2.7/site-packages/numpy/linalg/linalg.py
Definition: np.linalg.svd(a, full_matrices=1, compute_uv=1)
Docstring:
Singular Value Decomposition.
Factors the matrix
a
asu * np.diag(s) * v
, whereu
andv
are unitary and
s
is a 1-d array ofa
's singular values.Parameters
a : (..., M, N) array_like
A real or complex matrix of shape (
M
,N
) .full_matrices : bool, optional
If True (default),
u
andv
have the shapes (M
,M
) and(
N
,N
), respectively. Otherwise, the shapes are (M
,K
)and (
K
,N
), respectively, whereK
= min(M
,N
).compute_uv : bool, optional
Whether or not to compute
u
andv
in addition tos
. Trueby default.
Returns
u : { (..., M, M), (..., M, K) } array
Unitary matrices. The actual shape depends on the value of
full_matrices
. Only returned whencompute_uv
is True.s : (..., K) array
The singular values for every matrix, sorted in descending order.
v : { (..., N, N), (..., K, N) } array
Unitary matrices. The actual shape depends on the value of
Examples
a = np.random.randn(9, 6) + 1j*np.random.randn(9, 6)
The text was updated successfully, but these errors were encountered: