Skip to content

Commit 5a44e82

Browse files
authored
Merge pull request #670 from Mathics3/complete_doc_url_bunch_b
docstring urls for vectors, numbers and matrices
2 parents e85aa19 + 3edfde2 commit 5a44e82

File tree

14 files changed

+499
-281
lines changed

14 files changed

+499
-281
lines changed

mathics/builtin/matrices/constrmatrix.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,13 @@
1313

1414
class DiagonalMatrix(Builtin):
1515
"""
16+
<url>:WMA link:
17+
https://reference.wolfram.com/language/ref/DiagonalMatrix.html</url>
18+
1619
<dl>
1720
<dt>'DiagonalMatrix[$list$]'
18-
<dd>gives a matrix with the values in $list$ on its diagonal and zeroes elsewhere.
21+
<dd>gives a matrix with the values in $list$ on its diagonal and \
22+
zeroes elsewhere.
1923
</dl>
2024
2125
>> DiagonalMatrix[{1, 2, 3}]
@@ -44,6 +48,9 @@ def apply(self, list, evaluation):
4448

4549
class IdentityMatrix(Builtin):
4650
"""
51+
<url>:WMA link:
52+
https://reference.wolfram.com/language/ref/IdentityMatrix.html</url>
53+
4754
<dl>
4855
<dt>'IdentityMatrix[$n$]'
4956
<dd>gives the identity matrix with $n$ rows and columns.

mathics/builtin/matrices/partmatrix.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,16 @@
1313

1414
class Diagonal(Builtin):
1515
"""
16+
<url>:WMA link:
17+
https://reference.wolfram.com/language/ref/Diagonal.html</url>
18+
1619
<dl>
1720
<dt>'Diagonal[$m$]'
1821
<dd>gives a list with the values in the diagonal of the matrix $m$.
22+
1923
<dt>'Diagonal[$m$, $k$]'
20-
<dd>gives a list with the values in the $k$ diagonal of the matrix $m$.
24+
<dd>gives a list with the values in the $k$ diagonal of the \
25+
matrix $m$.
2126
</dl>
2227
2328
>> Diagonal[{{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}]
@@ -58,12 +63,15 @@ def apply(self, expr, diag, evaluation):
5863

5964
class MatrixQ(Builtin):
6065
"""
66+
<url>:WMA link:https://reference.wolfram.com/language/ref/MatrixQ.html</url>
67+
6168
<dl>
6269
<dt>'MatrixQ[$m$]'
6370
<dd>gives 'True' if $m$ is a list of equal-length lists.
6471
6572
<dt>'MatrixQ[$m$, $f$]'
66-
<dd>gives 'True' only if '$f$[$x$]' returns 'True' for when applied to element $x$ of the matrix $m$.
73+
<dd>gives 'True' only if '$f$[$x$]' returns 'True' for when applied to \
74+
element $x$ of the matrix $m$.
6775
</dl>
6876
6977
>> MatrixQ[{{1, 3}, {4.0, 3/2}}, NumberQ]

0 commit comments

Comments
 (0)