Skip to content

Commit a937904

Browse files
committed
Migrate full(X) to convert(Array, X) in tests outside of test/sparsedir and test/linalg. Migrate full to convert in some documentation.
1 parent 36ffe1e commit a937904

File tree

7 files changed

+13
-12
lines changed

7 files changed

+13
-12
lines changed

base/docs/helpdb/Base.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -8665,7 +8665,7 @@ the one with smallest norm is returned.
86658665
86668666
Multiplication with respect to either thin or full `Q` is allowed, i.e. both `F[:Q]*F[:R]`
86678667
and `F[:Q]*A` are supported. A `Q` matrix can be converted into a regular matrix with
8668-
[`full`](:func:`full`) which has a named argument `thin`.
8668+
[`convert(Array, _)`](:func:`convert`).
86698669
86708670
**note**
86718671

doc/manual/arrays.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -811,7 +811,7 @@ reference.
811811
+----------------------------------------+----------------------------------+--------------------------------------------+
812812
| :func:`speye(n) <speye>` | :func:`eye(n) <eye>` | Creates a *n*-by-*n* identity matrix. |
813813
+----------------------------------------+----------------------------------+--------------------------------------------+
814-
| :func:`full(S) <full>` | :func:`sparse(A) <sparse>` | Interconverts between dense |
814+
| :func:`convert(Array, S) <convert>` | :func:`sparse(A) <sparse>` | Interconverts between dense |
815815
| | | and sparse formats. |
816816
+----------------------------------------+----------------------------------+--------------------------------------------+
817817
| :func:`sprand(m,n,d) <sprand>` | :func:`rand(m,n) <rand>` | Creates a *m*-by-*n* random matrix (of |

doc/stdlib/linalg.rst

+7-7
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ Linear algebra functions in Julia are largely implemented by calling functions f
7575

7676
.. Docstring generated from Julia source
7777
78-
Constructs an upper (``isupper=true``\ ) or lower (``isupper=false``\ ) bidiagonal matrix using the given diagonal (``dv``\ ) and off-diagonal (``ev``\ ) vectors. The result is of type ``Bidiagonal`` and provides efficient specialized linear solvers, but may be converted into a regular matrix with :func:`full`\ . ``ev``\ 's length must be one less than the length of ``dv``\ .
78+
Constructs an upper (``isupper=true``\ ) or lower (``isupper=false``\ ) bidiagonal matrix using the given diagonal (``dv``\ ) and off-diagonal (``ev``\ ) vectors. The result is of type ``Bidiagonal`` and provides efficient specialized linear solvers, but may be converted into a regular matrix with :func:`convert`\ . ``ev``\ 's length must be one less than the length of ``dv``\ .
7979

8080
**Example**
8181

@@ -90,7 +90,7 @@ Linear algebra functions in Julia are largely implemented by calling functions f
9090

9191
.. Docstring generated from Julia source
9292
93-
Constructs an upper (``uplo='U'``\ ) or lower (``uplo='L'``\ ) bidiagonal matrix using the given diagonal (``dv``\ ) and off-diagonal (``ev``\ ) vectors. The result is of type ``Bidiagonal`` and provides efficient specialized linear solvers, but may be converted into a regular matrix with :func:`full`\ . ``ev``\ 's length must be one less than the length of ``dv``\ .
93+
Constructs an upper (``uplo='U'``\ ) or lower (``uplo='L'``\ ) bidiagonal matrix using the given diagonal (``dv``\ ) and off-diagonal (``ev``\ ) vectors. The result is of type ``Bidiagonal`` and provides efficient specialized linear solvers, but may be converted into a regular matrix with :func:`convert`\ . ``ev``\ 's length must be one less than the length of ``dv``\ .
9494

9595
**Example**
9696

@@ -119,13 +119,13 @@ Linear algebra functions in Julia are largely implemented by calling functions f
119119

120120
.. Docstring generated from Julia source
121121
122-
Construct a symmetric tridiagonal matrix from the diagonal and first sub/super-diagonal, respectively. The result is of type ``SymTridiagonal`` and provides efficient specialized eigensolvers, but may be converted into a regular matrix with :func:`full`\ .
122+
Construct a symmetric tridiagonal matrix from the diagonal and first sub/super-diagonal, respectively. The result is of type ``SymTridiagonal`` and provides efficient specialized eigensolvers, but may be converted into a regular matrix with :func:`convert`\ .
123123

124124
.. function:: Tridiagonal(dl, d, du)
125125

126126
.. Docstring generated from Julia source
127127
128-
Construct a tridiagonal matrix from the first subdiagonal, diagonal, and first superdiagonal, respectively. The result is of type ``Tridiagonal`` and provides efficient specialized linear solvers, but may be converted into a regular matrix with :func:`full`\ . The lengths of ``dl`` and ``du`` must be one less than the length of ``d``\ .
128+
Construct a tridiagonal matrix from the first subdiagonal, diagonal, and first superdiagonal, respectively. The result is of type ``Tridiagonal`` and provides efficient specialized linear solvers, but may be converted into a regular matrix with :func:`convert`\ . The lengths of ``dl`` and ``du`` must be one less than the length of ``d``\ .
129129

130130
.. function:: Symmetric(A, uplo=:U)
131131

@@ -461,7 +461,7 @@ Linear algebra functions in Julia are largely implemented by calling functions f
461461

462462
The following functions are available for the ``QR`` objects: ``size``\ , ``\``\ . When ``A`` is rectangular, ``\`` will return a least squares solution and if the solution is not unique, the one with smallest norm is returned.
463463

464-
Multiplication with respect to either thin or full ``Q`` is allowed, i.e. both ``F[:Q]*F[:R]`` and ``F[:Q]*A`` are supported. A ``Q`` matrix can be converted into a regular matrix with :func:`full` which has a named argument ``thin``\ .
464+
Multiplication with respect to either thin or full ``Q`` is allowed, i.e. both ``F[:Q]*F[:R]`` and ``F[:Q]*A`` are supported. A ``Q`` matrix can be converted into a regular matrix with :func:`convert`\ .
465465

466466
**note**
467467

@@ -626,7 +626,7 @@ Linear algebra functions in Julia are largely implemented by calling functions f
626626

627627
.. Docstring generated from Julia source
628628
629-
Compute the Hessenberg decomposition of ``A`` and return a ``Hessenberg`` object. If ``F`` is the factorization object, the unitary matrix can be accessed with ``F[:Q]`` and the Hessenberg matrix with ``F[:H]``\ . When ``Q`` is extracted, the resulting type is the ``HessenbergQ`` object, and may be converted to a regular matrix with :func:`full`\ .
629+
Compute the Hessenberg decomposition of ``A`` and return a ``Hessenberg`` object. If ``F`` is the factorization object, the unitary matrix can be accessed with ``F[:Q]`` and the Hessenberg matrix with ``F[:H]``\ . When ``Q`` is extracted, the resulting type is the ``HessenbergQ`` object, and may be converted to a regular matrix with :func:`convert`\ .
630630

631631
.. function:: hessfact!(A)
632632

@@ -942,7 +942,7 @@ Linear algebra functions in Julia are largely implemented by calling functions f
942942

943943
.. Docstring generated from Julia source
944944
945-
Construct a tridiagonal matrix from the first subdiagonal, diagonal, and first superdiagonal, respectively. The result is of type ``Tridiagonal`` and provides efficient specialized linear solvers, but may be converted into a regular matrix with :func:`full`\ . The lengths of ``dl`` and ``du`` must be one less than the length of ``d``\ .
945+
Construct a tridiagonal matrix from the first subdiagonal, diagonal, and first superdiagonal, respectively. The result is of type ``Tridiagonal`` and provides efficient specialized linear solvers, but may be converted into a regular matrix with :func:`convert`\ . The lengths of ``dl`` and ``du`` must be one less than the length of ``d``\ .
946946

947947
.. function:: rank(M)
948948

doc/stdlib/strings.rst

+1
Original file line numberDiff line numberDiff line change
@@ -500,3 +500,4 @@
500500
.. Docstring generated from Julia source
501501
502502
Create a string from the address of a NUL-terminated UTF-32 string. A copy is made; the pointer can be safely freed. If ``length`` is specified, the string does not have to be NUL-terminated.
503+

doc/stdlib/test.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ gives a `Broken` `Result`.
306306

307307
.. Docstring generated from Julia source
308308
309-
For use to indicate a test that should pass but currently intermittently fails. Does not evaluate the expression.
309+
For use to indicate a test that should pass but currently intermittently fails. Does not evaluate the expression, which makes it useful for tests of not-yet-implemented functionality.
310310

311311
Creating Custom ``AbstractTestSet`` Types
312312
-----------------------------------------

test/hashing.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ end
8989
x = sprand(10, 10, 0.5)
9090
x[1] = 1
9191
x.nzval[1] = 0
92-
@test hash(x) == hash(full(x))
92+
@test hash(x) == hash(convert(Array, x))
9393

9494
let a = QuoteNode(1), b = QuoteNode(1.0)
9595
@test (hash(a)==hash(b)) == (a==b)

test/perf/threads/stockcorr/pstockcorr.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ function pstockcorr(n)
7878
SimulPriceB[1,:] = CurrentPrice[2]
7979

8080
## Generating the paths of stock prices by Geometric Brownian Motion
81-
const UpperTriangle = full(chol(Corr)) # UpperTriangle Matrix by Cholesky decomposition
81+
const UpperTriangle = convert(Array, chol(Corr)) # UpperTriangle Matrix by Cholesky decomposition
8282

8383
# Optimization: pre-allocate these for performance
8484
# NOTE: the new GC will hopefully fix this, but currently GC time

0 commit comments

Comments
 (0)