Operations¶
fori_loop(lower: int, upper: int, f: Callable[[int], PyTree | None]) -> PyTree | None
¶
Loop from lower to upper evaluating a function f.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
lower
|
int
|
The starting index (inclusive). |
required |
upper
|
int
|
The ending index (exclusive). |
required |
f
|
Callable[[int], PyTree | None]
|
A function accepting an integer index |
required |
Returns:
| Type | Description |
|---|---|
PyTree | None
|
A |
Source code in src/bayinx/ops.py
map(f: Callable[..., PyTree | None], *xs: Any) -> PyTree | None
¶
Map a function over the leading axis of the arguments.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
f
|
Callable[..., PyTree | None]
|
A user-defined function that accepts slices of the input positional arguments. |
required |
xs
|
Any
|
Additional positional arguments that are sliced and passed to |
()
|
Returns:
| Type | Description |
|---|---|
PyTree | None
|
A |