tmap (Python 3.9+ & Apple Silicon Compatible)
This is a fork of tmap that is compatible with Python 3.9-3.12 and Apple Silicon (arm64).
tmap is a very fast visualization library for large, high-dimensional data sets. The graph layouts are based on the OGDF library.
Installation
Option 1: Install from GitHub (Recommended)
pip install git+https://github.com/afloresep/silicon-tmap-compatible.git
Option 2: Install from pre-built wheels
Check the Releases page for pre-built wheels for your platform.
Option 3: Build from source
For Apple Silicon Macs or if you need to build from source:
# Clone the repository
git clone https://github.com/afloresep/silicon-tmap-compatible.git
cd silicon-tmap-compatible
# Create conda environment with build dependencies
conda create -n tmap python=3.12 -y
conda activate tmap
conda install -c conda-forge cmake ninja llvm-openmp numpy scipy matplotlib annoy pybind11 -y
# Build OGDF
cd ogdf-conda/src
mkdir -p build installed
cd build
cmake .. \
-DCMAKE_INSTALL_PREFIX="$PWD/../installed" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_OSX_ARCHITECTURES=arm64 # Only for Apple Silicon
cmake --build . --parallel
cmake --install .
cd ../../..
# Install tmap
export LIBOGDF_INSTALL_PATH="$PWD/ogdf-conda/src/installed"
pip install . --no-build-isolation
Visualization
We recommend using faerun to plot the data laid out by tmap:
pip install faerun
Quick Example
import tmap as tm
import numpy as np
# Generate random data
data = np.random.rand(1000, 100)
# Create MinHash fingerprints
mh = tm.Minhash(128)
fps = [tm.VectorFloat(row) for row in data]
lf = tm.LSHForest(128)
lf.batch_add(mh.batch_from_weight_array(fps))
lf.index()
# Layout
cfg = tm.LayoutConfiguration()
cfg.k = 20
x, y, s, t, _ = tm.layout_from_lsh_forest(lf, cfg)
# Plot with faerun or matplotlib
import matplotlib.pyplot as plt
plt.scatter(x, y, s=1)
plt.show()
Tutorial and Documentation
See the original documentation at http://tmap.gdb.tools
Examples
| Name | Description |
|---|---|
| MNIST | Visualization of the MNIST data set |
| Drugbank | All drugs registered in Drugbank |
| Project Gutenberg | Linguistic relationships between books |
Compatibility
| Python | Linux | macOS Intel | macOS Apple Silicon | Windows |
|---|---|---|---|---|
| 3.9 | ✅ | ✅ | ✅ | ✅ |
| 3.10 | ✅ | ✅ | ✅ | ✅ |
| 3.11 | ✅ | ✅ | ✅ | ✅ |
| 3.12 | ✅ | ✅ | ✅ | ✅ |
Changes from Original
- Fixed compatibility with Python 3.9-3.12
- Fixed Apple Silicon (arm64) builds
- Updated deprecated
distutilsimports - Added proper
pyproject.tomlbuild configuration
License
BSD 3-Clause License - see LICENSE.md
Credits
Original tmap by Daniel Probst and the Reymond Group.
Metadata
Release files for tmap-silicon 1.0.19
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| tmap_silicon-1.0.19.tar.gz | 11.1 kB | Details |
Built distributions (wheels)
Total release size: 51.7 MB
Release files / tmap_silicon-1.0.19.tar.gz
| Download URL | tmap_silicon-1.0.19.tar.gz |
|---|---|
| Size | 11.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dd4bbd9ec65136d90d6f598745dd0a1093f2d3c8fe3fa30499397d5b328d147f
|
|
BLAKE2b-256 checksum How to use checksums |
365facce7287d244adca866dbdf2a40be3d10f10a480c7f756d38f5dfab49603
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.8
|
Release files / tmap_silicon-1.0.19-cp313-cp313-win_amd64.whl
| Download URL | tmap_silicon-1.0.19-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 666.4 kB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
a4bf85ed2b03142b509965ad0ec403da79bb9d2005f48d76c8a8dd4dad94c3ef
|
|
BLAKE2b-256 checksum How to use checksums |
92a5ae3a0f3f5f171acd65f96352a2bebbb233599f9709e3404d11da7cfb7c45
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.8
|
Release files / tmap_silicon-1.0.19-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | tmap_silicon-1.0.19-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 5.7 MB |
| Tags | CPython 3.13 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
497f5f8f6eade90fe2938005d2a2f70b845a9e28f668ec406282a8be6c60769b
|
|
BLAKE2b-256 checksum How to use checksums |
0be4741aef2fc3577851b5edb9926c33d5a5ede1fa3e41cb285db8d3cefbda88
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.8
|
Release files / tmap_silicon-1.0.19-cp313-cp313-macosx_14_0_arm64.whl
| Download URL | tmap_silicon-1.0.19-cp313-cp313-macosx_14_0_arm64.whl |
|---|---|
| Size | 4.0 MB |
| Tags | CPython 3.13 macOS 14.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
d6c27b7b577b396ee250eaffe6b1ad3cf26b41c090b7e7d4d1a39b7d4e5ab2b0
|
|
BLAKE2b-256 checksum How to use checksums |
489d9abdabe4d18f90d2e1fa036b3f53a454cbf24f6001995efaa5e2fa5f8d69
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.8
|
Release files / tmap_silicon-1.0.19-cp312-cp312-win_amd64.whl
| Download URL | tmap_silicon-1.0.19-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 666.5 kB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
20328f9c6732ba7fc1976bea748cb3a046d071739e31cbbd932b868c2aef5a2c
|
|
BLAKE2b-256 checksum How to use checksums |
a2eafa0f1851e0732e55b9d423e9175ae6784245cd6c3f744f7d8f03589a5241
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.8
|
Release files / tmap_silicon-1.0.19-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | tmap_silicon-1.0.19-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 5.7 MB |
| Tags | CPython 3.12 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
56434de65fa79751f7af3f53232c6bd1088518ce4a837387c32aa4545b5dcda1
|
|
BLAKE2b-256 checksum How to use checksums |
98cd5f35b6abe216b8eb68e4d3152b74f98185b4fb7a94afb87c4aaa9c83ac49
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.8
|
Release files / tmap_silicon-1.0.19-cp312-cp312-macosx_14_0_arm64.whl
| Download URL | tmap_silicon-1.0.19-cp312-cp312-macosx_14_0_arm64.whl |
|---|---|
| Size | 4.0 MB |
| Tags | CPython 3.12 macOS 14.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
58456ea5c8fb4070c74ad19392ee3d9a30e3bc29d367193396ff55b8408e1a6e
|
|
BLAKE2b-256 checksum How to use checksums |
7d58b22385569d457dce2846467017b5e6f4551e44a86983b0e1137ae13e9054
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.8
|
Release files / tmap_silicon-1.0.19-cp311-cp311-win_amd64.whl
| Download URL | tmap_silicon-1.0.19-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 664.4 kB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
ed0b90cd3ed2397aee4b9460bb5e4325021e87e1af5dac8ba7512ab3bcde116e
|
|
BLAKE2b-256 checksum How to use checksums |
a11ec4c6f923856eba82ef0eaf486a2ac95113785e7b7b432b99ea4969655799
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.8
|
Release files / tmap_silicon-1.0.19-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | tmap_silicon-1.0.19-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 5.7 MB |
| Tags | CPython 3.11 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
191b11e7634f1558884af711a71d429202c48a84a9e5adf64c143396bbeadb22
|
|
BLAKE2b-256 checksum How to use checksums |
c0ddc422121a97d14ac6903e58f511096efccf0285c395d40e31058b4cfe4dbd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.8
|
Release files / tmap_silicon-1.0.19-cp311-cp311-macosx_14_0_arm64.whl
| Download URL | tmap_silicon-1.0.19-cp311-cp311-macosx_14_0_arm64.whl |
|---|---|
| Size | 4.0 MB |
| Tags | CPython 3.11 macOS 14.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
b7f5cfa760904a9aa060719a3118f9c9e1a9cf94313ec7c1e07ac024c7753b8e
|
|
BLAKE2b-256 checksum How to use checksums |
de0c3eee3cd6d84cf51b78f4dfbf161a7847f93fc0ec0b6386a8d877baa7ef46
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.8
|
Release files / tmap_silicon-1.0.19-cp310-cp310-win_amd64.whl
| Download URL | tmap_silicon-1.0.19-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 664.3 kB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
ee885661fca4d3cc91261efdfa0a6491a08f5f85a793891ac5a1037a876a989a
|
|
BLAKE2b-256 checksum How to use checksums |
48a865b89d2da9041acfcfa995a399ef1f841e0d3027ccf44defe1a6bfeb2e40
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.8
|
Release files / tmap_silicon-1.0.19-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | tmap_silicon-1.0.19-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 5.7 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
6a8268261c98f9b9e456ac07a894edc77d42d7f1b059222f53a12de74bd05c82
|
|
BLAKE2b-256 checksum How to use checksums |
ea8d62944ac9cbbfb9cfe132873fbf997318208da024d38f96be92e459483f4a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.8
|
Release files / tmap_silicon-1.0.19-cp310-cp310-macosx_14_0_arm64.whl
| Download URL | tmap_silicon-1.0.19-cp310-cp310-macosx_14_0_arm64.whl |
|---|---|
| Size | 4.0 MB |
| Tags | CPython 3.10 macOS 14.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
d12037999223bd4126809fe0e812f3acbbb35806c13d56b35f965349986f9ce2
|
|
BLAKE2b-256 checksum How to use checksums |
2b6f95d91e7be02569f34ee8cfe8493d35a1ad5bf96dab387593bd5001d7e899
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.8
|
Release files / tmap_silicon-1.0.19-cp39-cp39-win_amd64.whl
| Download URL | tmap_silicon-1.0.19-cp39-cp39-win_amd64.whl |
|---|---|
| Size | 664.2 kB |
| Tags | CPython 3.9 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
dd67109a8340dadc0666776c2925919b63c29c8df4cd0a2f908121e0865802fc
|
|
BLAKE2b-256 checksum How to use checksums |
802a8d8756087b18f00be6353e414ed8d9d6b9092ed9c503f51b5358d69c98ae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.8
|
Release files / tmap_silicon-1.0.19-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | tmap_silicon-1.0.19-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 5.7 MB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
89519488817c731a4a49a6aa85bf6a18132d1a3bcf0999ac966daabd8af8733e
|
|
BLAKE2b-256 checksum How to use checksums |
b02f60ab62585bc8131478a8bbe6158131730b781be8afb662431d5fcb6c16c5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.8
|
Release files / tmap_silicon-1.0.19-cp39-cp39-macosx_14_0_arm64.whl
| Download URL | tmap_silicon-1.0.19-cp39-cp39-macosx_14_0_arm64.whl |
|---|---|
| Size | 4.0 MB |
| Tags | CPython 3.9 macOS 14.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
2e71e2e024f54ed235e05d1d229fdc5f49ba628fbdf4fe05d313e1cff0901951
|
|
BLAKE2b-256 checksum How to use checksums |
6769b6df74e74ea58ba7d9c1ed828a61ff829b39361f6f97b62e5d0acd1f9b44
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.8
|