Skip to content

Commit 191ee76

Browse files
authored
Merge pull request #17 from ChevronETC/docsreshape
add docstring for JopReshape
2 parents ead380e + f635f50 commit 191ee76

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/jop_reshape.jl

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
"""
2+
A = JopReshape(dom, rng)
3+
4+
Reshape an array that belongs in `dom::JetAbstractSpace` to one that belongs to `rng::JetAbstractSpace`
5+
6+
# Example
7+
```julia
8+
using Jets, JetPack
9+
dom = JetSpace(Float32,10,20)
10+
rng = JetSpace(Float32,200)
11+
A = JopReshape(JetSpace(Float32,10,20), JetSpace(Float32,200))
12+
x = rand(domain(A))
13+
y = A*x
14+
```
15+
"""
116
JopReshape(dom::JetAbstractSpace, rng::JetAbstractSpace) = JopLn(dom = dom, rng = rng, df! = JopReshape_df!)
217

318
export JopReshape

0 commit comments

Comments
 (0)