Skip to content

Commit ca7dbbe

Browse files
authored
Update README.md
1 parent 8c6b9bc commit ca7dbbe

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

README.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,8 @@ of length $d$), and the trailing tensor dimensions of the Jacobian
133133
tensor $G$ and the input uncertainty tensor $U$ correspond to
134134
these indices. The code below provides an implementation.
135135

136-
def make_lpu(d: int) -> Callable[[Array, Array], Array]:
136+
```python
137+
def make_lpu(d: int) -> Callable[[Array, Array], Array]:
137138
"""
138139
Returns the law of propagation of uncertainty.
139140
@@ -143,11 +144,19 @@ these indices. The code below provides an implementation.
143144

144145
@jax.jit
145146
def lpu(g: Array, u: Array) -> Array:
146-
"""The law of propagation of uncertainty."""
147+
r"""
148+
The law of propagation of uncertainty.
149+
150+
:param g: The Jacobian tensor :math:`G`.
151+
:param u: The uncertainty tensor :math:`U`.
152+
:returns: The uncertainty tensor :math:`V`.
153+
"""
147154
dims = tuple(range(-d, 0))
148155
return jnp.tensordot(jnp.tensordot(g, u, (dims, dims)), g, (dims, dims))
149156

150157
return lpu
158+
```
159+
151160

152161
[![CodeQL Advanced](https://github.com/bcdev/uncertaintyx/actions/workflows/codeql.yml/badge.svg)](https://github.com/bcdev/uncertaintyx/actions/workflows/codeql.yml)
153162
[![Python package](https://github.com/bcdev/uncertaintyx/actions/workflows/python-package.yml/badge.svg)](https://github.com/bcdev/uncertaintyx/actions/workflows/python-package.yml)

0 commit comments

Comments
 (0)