-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
33 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,30 @@ | ||
# jaxadi | ||
|
||
**jaxadi** is a Python library designed to translate `casadi.Function` into `jax`-compatible functions. | ||
|
||
## Installation | ||
|
||
```bash | ||
pip3 install -e . | ||
``` | ||
|
||
## Usage | ||
|
||
```python | ||
from jaxadi import translate, convert, lower | ||
|
||
translate(casadi_function) # get jax-compatible function string representation | ||
lower(jax_fn, casadi_fn) # get jax.lower function which is compatible with different platforms for exporting | ||
convert(casad_fn) # get possibly compiled jax function from casadi function | ||
``` | ||
|
||
## Examples | ||
|
||
1. Translate - [example](examples/00_translate.py) | ||
2. Lower - [example](examples/01_lower.py) | ||
3. Convert - [example](examples/02_convert.py) | ||
4. Pinocchio casadi -> jax - [example](examples/03_pinocchio.py) | ||
|
||
## References | ||
|
||
This work is heavily inspired from [cusadi](https://github.com/se-hwan/cusadi), but simplier to support and focused on jax. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,10 @@ | |
name = "jaxadi" | ||
description = "asdf" | ||
version = "0.1.0" | ||
authors = [{ name = "Lev Kozlov", email = "[email protected]" }] | ||
authors = [ | ||
{ name = "Lev Kozlov", email = "[email protected]" }, | ||
{ name = "Igor Alentev", email = "[email protected]" }, | ||
] | ||
dependencies = ["casadi", "jax"] | ||
readme = "README.md" | ||
requires-python = ">=3.10" | ||
|