Skip to content

Commit 45e9458

Browse files
committed
Fixed errors and corrected style in specs doc
1 parent 03b2dc3 commit 45e9458

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

doc/specs/stdlib_linalg.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ Experimental
177177

178178
### Description
179179

180-
Create a diagonal array or extract the diagonal elements of an array
180+
Computes the outer product of two vectors
181181

182182
### Syntax
183183

@@ -191,7 +191,7 @@ Create a diagonal array or extract the diagonal elements of an array
191191

192192
### Return value
193193

194-
Returns a rank-2 array equal to `u v^T` (assuming `u, v` are column vectors). The dimensions of the returned array are `[size(u), size(v)]`
194+
Returns a rank-2 array equal to `u v^T` (assuming `u, v` are column vectors). The shape of the returned array is `[size(u), size(v)]`.
195195

196196
### Example
197197

@@ -200,9 +200,9 @@ program demo_outer_product
200200
use stdlib_linalg, only: outer_product
201201
implicit none
202202
real, allocatable :: A(:,:), u(:), v(:)
203-
u = [1.,2.,3.]
203+
u = [1. ,2. ,3. ]
204204
v = [3., 4.]
205-
A=outer_product(u,v)
206-
!A = transpose(reshape([3., 4., 6., 8., 9., 12.], [3,2]))
205+
A = outer_product(u,v)
206+
!A = reshape([3., 6., 9., 4., 8., 12.], [3,2])
207207
end program demo_outer_product
208208
```

0 commit comments

Comments
 (0)