Skip to content

CompTop/BATS.py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

3a5ab77 · Jun 1, 2022
Feb 24, 2022
Jun 1, 2022
Jun 1, 2022
Mar 11, 2022
Mar 23, 2020
Apr 29, 2022
Mar 30, 2022
Aug 19, 2021
Feb 24, 2022
Dec 18, 2019
Aug 20, 2021
Feb 25, 2022
Feb 25, 2022
Aug 24, 2021
Feb 24, 2022

Repository files navigation

BATS.py

Supported Python Versions PyPi License: MIT

Build Static Ubuntu Tests MacOS Tests Documentation Status

Python bindings for the Basic Applied Topology Subprograms (BATS) library. This includes:

  • Simplicial, Cubical, and Cell Complexes
  • Simplicial, Cubical, and Cellular Maps
  • Homology and induced maps
  • Persistent homology
  • Zigzag homology
  • A variety of topolgical constructions

Note that the C++ repository is the main library, and contains more features. This repository provides bindings for a subset of the functionality of BATS, and is under active development.

Documentation, examples, and tutorials can be found at bats-tda.readthedocs.io

Once installed, you can import the bats namespace:

import bats

Installation with pip

The easiest way to install bats is using pip

pip install bats-tda # gcc

To use clang (e.g. on a Mac) note that you must install openMP first

CC=clang pip install bats-tda # clang

Wheels are provided for Linux. If you want to force compilation from source, you can use

pip install --verbose --no-binary bats-tda bats-tda

bats uses OpenMP, and it has to be compiled from source with a C++17 compliant compiler. This means installation can take a few minutes. You can pass --verbose to pip to see what is going on with installation.

If you don't have OpenMP, you can install with a package manager.

GCC (e.g. on Linux)

dnf install libgomp-devel # Fedora
apt-get install libgomp1-dev # Ubuntu

Clang (e.g. on Mac)

brew install libomp