SoS Notebook extension for the Lua programming language.
pip install sos-luaYou will also need a Lua Jupyter kernel installed. This module supports:
- ILua (
pip install ilua) - kernel namelua - xeus-lua (
conda install -c conda-forge xeus-lua) - kernel namexlua
This module supports exchanging the following data types between SoS (Python) and Lua:
| Python | Lua |
|---|---|
None |
nil |
bool |
boolean |
int, float |
number |
str |
string |
list, tuple |
sequential table {1, 2, 3} |
dict |
keyed table {a=1, b=2} |
set |
sequential table |
numpy.ndarray |
nested table |
pandas.DataFrame |
table of column tables |
Nested structures (tables within tables) are supported in both directions.
In a SoS notebook, use Lua cells and exchange variables with %get and %put:
# In a SoS cell
data = [1, 2, 3]
# In a Lua cell
%get data
print(data[1]) -- prints 1
# Transfer back
result = {sum = 6, count = 3}
%put result