Skip to content

Latest commit

 

History

History
72 lines (50 loc) · 1.26 KB

File metadata and controls

72 lines (50 loc) · 1.26 KB

Python NLSA code

Requires Python 3.12 or above.

Installation

Using venv and pip

Create Python virtual environment:

python3 -m venv venv

Activate virtual environment:

source ./venv/bin/activate

Install nlsa module and dependencies by running one of the following command from within the Python directory of the NLSA repo. Additional information on install packages can be found in pyproject.toml.

  • CPU installation:
pip install -e .
  • NVIDIA GPU installation:
pip install -e ".[cuda]"
  • Additional dependencies for development:
pip install -e ".[dev]"
  • Install with multiple options:
pip install -e ".[cuda, dev]"

Running the examples

Various numerical examples can be found in the directory Python/examples.

Further info

Deactivate virtual environment:

deactivate

Save notebook to HTML, including current state of widgets (check that Settings -> Save Widget State Automatically is selected):

jupyter nbconvert --to html --no-input <notebook_name>.ipynb

Running from REPL:

import importlib as i
nl = i.import_module("nlsa")
i.reload(nl)

List installed packages:

pip freeze > requirements.txt