Skip to main content

A Graph Partitioning Package

Project description

Gitlab Build Status Github Build Status Python Package Index Release Page Zenodo DOI for latest release

PyMetis is a Python wrapper for the Metis graph partititioning software by George Karypis, Vipin Kumar and others. It includes version 5.1.0 of Metis and wraps it using the Pybind11 wrapper generator library. So far, it only wraps the most basic graph partitioning functionality (which is enough for my current use), but extending it in case you need more should be quite straightforward. Using PyMetis to partition your meshes is really easy–essentially all you need to pass into PyMetis is an adjacency list for the graph and the number of parts you would like.

Installation

The following line should do the job:

pip install pymetis

Quick Start

This graph, adapted from Figure 2 of the Metis manual to use zero-based indexing,

doc/_static/tiny_01.png

can be defined and partitioned into two graphs with

import numpy as np
import pymetis
adjacency_list = [np.array([4, 2, 1]),
                  np.array([0, 2, 3]),
                  np.array([4, 3, 1, 0]),
                  np.array([1, 2, 5, 6]),
                  np.array([0, 2, 5]),
                  np.array([4, 3, 6]),
                  np.array([5, 3])]
n_cuts, membership = pymetis.part_graph(2, adjacency=adjacency_list)
# n_cuts = 3
# membership = [1, 1, 1, 0, 1, 0, 0]

nodes_part_0 = np.argwhere(np.array(membership) == 0).ravel() # [3, 5, 6]
nodes_part_1 = np.argwhere(np.array(membership) == 1).ravel() # [0, 1, 2, 4]
doc/_static/tiny_01_partitioned.png

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

PyMetis-2023.1.tar.gz (342.8 kB view details)

Uploaded Source

Built Distributions

PyMetis-2023.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (303.8 kB view details)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

PyMetis-2023.1-pp39-pypy39_pp73-manylinux_2_17_i686.manylinux2014_i686.whl (374.9 kB view details)

Uploaded PyPy manylinux: glibc 2.17+ i686

PyMetis-2023.1-pp39-pypy39_pp73-macosx_10_9_x86_64.whl (287.2 kB view details)

Uploaded PyPy macOS 10.9+ x86-64

PyMetis-2023.1-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (304.5 kB view details)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

PyMetis-2023.1-pp38-pypy38_pp73-manylinux_2_17_i686.manylinux2014_i686.whl (375.6 kB view details)

Uploaded PyPy manylinux: glibc 2.17+ i686

PyMetis-2023.1-pp38-pypy38_pp73-macosx_10_9_x86_64.whl (287.2 kB view details)

Uploaded PyPy macOS 10.9+ x86-64

PyMetis-2023.1-cp311-cp311-musllinux_1_1_x86_64.whl (846.9 kB view details)

Uploaded CPython 3.11 musllinux: musl 1.1+ x86-64

PyMetis-2023.1-cp311-cp311-musllinux_1_1_i686.whl (956.6 kB view details)

Uploaded CPython 3.11 musllinux: musl 1.1+ i686

PyMetis-2023.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (327.1 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

PyMetis-2023.1-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl (403.5 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ i686

PyMetis-2023.1-cp311-cp311-macosx_10_9_x86_64.whl (292.0 kB view details)

Uploaded CPython 3.11 macOS 10.9+ x86-64

PyMetis-2023.1-cp310-cp310-musllinux_1_1_x86_64.whl (846.9 kB view details)

Uploaded CPython 3.10 musllinux: musl 1.1+ x86-64

PyMetis-2023.1-cp310-cp310-musllinux_1_1_i686.whl (956.5 kB view details)

Uploaded CPython 3.10 musllinux: musl 1.1+ i686

PyMetis-2023.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (327.1 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

PyMetis-2023.1-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl (403.6 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ i686

PyMetis-2023.1-cp310-cp310-macosx_10_9_x86_64.whl (292.0 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

PyMetis-2023.1-cp39-cp39-musllinux_1_1_x86_64.whl (847.2 kB view details)

Uploaded CPython 3.9 musllinux: musl 1.1+ x86-64

PyMetis-2023.1-cp39-cp39-musllinux_1_1_i686.whl (956.7 kB view details)

Uploaded CPython 3.9 musllinux: musl 1.1+ i686

PyMetis-2023.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (327.2 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

PyMetis-2023.1-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl (403.9 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ i686

PyMetis-2023.1-cp39-cp39-macosx_10_9_x86_64.whl (292.1 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

PyMetis-2023.1-cp38-cp38-musllinux_1_1_x86_64.whl (846.8 kB view details)

Uploaded CPython 3.8 musllinux: musl 1.1+ x86-64

PyMetis-2023.1-cp38-cp38-musllinux_1_1_i686.whl (956.5 kB view details)

Uploaded CPython 3.8 musllinux: musl 1.1+ i686

PyMetis-2023.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (327.0 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

PyMetis-2023.1-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl (403.5 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ i686

PyMetis-2023.1-cp38-cp38-macosx_10_9_x86_64.whl (291.9 kB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

File details

Details for the file PyMetis-2023.1.tar.gz.

File metadata

  • Download URL: PyMetis-2023.1.tar.gz
  • Upload date:
  • Size: 342.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for PyMetis-2023.1.tar.gz
Algorithm Hash digest
SHA256 779eaaaa3ddcf780ec6a4678e6e4690aff9a658a304bd4c4efb8abdd6bd0b71e
MD5 f1cb0fa18e4ff4df0a121c15250d4443
BLAKE2b-256 5cc2545ba0032bb8c32ec6de7f2de92f301835a2002f77ff09a6471a7610bc36

See more details on using hashes here.

File details

Details for the file PyMetis-2023.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for PyMetis-2023.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9fb9a67b93ffa70f2ea65e1e15b856246039f49df60967f0c4b515537f9ad878
MD5 6e87864885514bcb764973c6194b2f54
BLAKE2b-256 40a5f0d6d7813d13caa73c9ea1ec228ccd400514f138cb404cfc6e387c46d7dd

See more details on using hashes here.

File details

Details for the file PyMetis-2023.1-pp39-pypy39_pp73-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for PyMetis-2023.1-pp39-pypy39_pp73-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 3313b1280111cf16f710da6b657f46ff75269c89d8f29e93e6858c9e11d22d7c
MD5 7ba47c7e4243e64eb04fdfe97e6dfdc5
BLAKE2b-256 022c263c355c02567e55302c759c4b44af746ba000f81c3364b07122fed5c701

See more details on using hashes here.

File details

Details for the file PyMetis-2023.1-pp39-pypy39_pp73-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for PyMetis-2023.1-pp39-pypy39_pp73-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 94c3bfc0a5271209b2ec60e2c3ac3489b64dd91814adff3e1e3ae346e2e73a5a
MD5 6754c58dede588e8164e64bebc079477
BLAKE2b-256 e1db3d5412d44205c4bd91c41432d7771b346e153192987b397bffae7bdb88a6

See more details on using hashes here.

File details

Details for the file PyMetis-2023.1-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for PyMetis-2023.1-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e556b61d7043d49b3d9a9e946603b56d4886ecfb865299aaba6f76bb1807dbe4
MD5 8b7d4d2daf46f2d0c22dfe20aace6f4f
BLAKE2b-256 8ad3d7707c7abb95d1952b34a27db0fa4ac57a2d361e8361f686f858496ba115

See more details on using hashes here.

File details

Details for the file PyMetis-2023.1-pp38-pypy38_pp73-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for PyMetis-2023.1-pp38-pypy38_pp73-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 3fa99d9fc7f5a05e521adb4fe70e180544f01222cf91398581b3d2f735383bb4
MD5 86b80809d8943d93c21a117aabaf96d8
BLAKE2b-256 e8ba91a6f6d364ae871a9204c184416fdf4d042ae48e00354c151ca75a865773

See more details on using hashes here.

File details

Details for the file PyMetis-2023.1-pp38-pypy38_pp73-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for PyMetis-2023.1-pp38-pypy38_pp73-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 97ed68ae8cb84377f99150af6a65cc49f1ed55150e3d8201c60387f756420d2d
MD5 216274ea76476156f7d60ad05d8a705a
BLAKE2b-256 b8d0e69fe6b0d346ba0c20c67f848e45f748c74ffd67b0eab9605c9a559c0291

See more details on using hashes here.

File details

Details for the file PyMetis-2023.1-cp311-cp311-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for PyMetis-2023.1-cp311-cp311-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 fdcef00b54b93933b0982163a2f4e73e498889c9b324a8985bc3c035a1dcbdb2
MD5 65238ea30eb6e2a4d5c2a90d12d2371a
BLAKE2b-256 58560bfe3ab6cc1bee238eac372d4b84bde5acad56b87f130578882c457a0fc6

See more details on using hashes here.

File details

Details for the file PyMetis-2023.1-cp311-cp311-musllinux_1_1_i686.whl.

File metadata

File hashes

Hashes for PyMetis-2023.1-cp311-cp311-musllinux_1_1_i686.whl
Algorithm Hash digest
SHA256 c0b1d7baa329e31819f830cd0e4506a3fe2ac998eaaef75837c75b12d38f65ac
MD5 3d708c62bed7caa64cbeb1827e36ef21
BLAKE2b-256 4293a7a383ff2a9d01e6aa1c81de3fdccea3a373723cf36078ae476d6aa9a241

See more details on using hashes here.

File details

Details for the file PyMetis-2023.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for PyMetis-2023.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 20c5e686c5293ff974466968ad2e997d9e34e5071edb2c7fec41aad629c00c45
MD5 b9046cea319ec727646e76d5acb2bf49
BLAKE2b-256 c1d8528e90c6016bd4177cd30c007555bfd53199d7a49a75c693e311b445d726

See more details on using hashes here.

File details

Details for the file PyMetis-2023.1-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for PyMetis-2023.1-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 d14e714aa779b6284b806e1fca26a2c502931b863090a3a25b6f883d1c8d5a77
MD5 6196f6167b52735ded133d71d9edad2f
BLAKE2b-256 589fc3d1de51d5adf9e56582f5c22d868b319f551d5657c64975e40df02f0d2e

See more details on using hashes here.

File details

Details for the file PyMetis-2023.1-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for PyMetis-2023.1-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 e806ffb228df1c3329b8fa0b8abc5ae8e6ba1db74df56994f52523ffde806365
MD5 f6b2692a065123b62b686524587ee6e1
BLAKE2b-256 8b5d36567d805e17ab6a746b440a13648e1244f6d9fcc1f2e458bb83668047e1

See more details on using hashes here.

File details

Details for the file PyMetis-2023.1-cp310-cp310-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for PyMetis-2023.1-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 f5991780a1a2672d51709d2d0cf4b0e84f38416f64f5407632da67606e623554
MD5 1443092352cc1f413e1b4e1f93cfca97
BLAKE2b-256 82c88d345c10039485875e425e18ebb97dde2b2ac390008f83ada031e021c32f

See more details on using hashes here.

File details

Details for the file PyMetis-2023.1-cp310-cp310-musllinux_1_1_i686.whl.

File metadata

File hashes

Hashes for PyMetis-2023.1-cp310-cp310-musllinux_1_1_i686.whl
Algorithm Hash digest
SHA256 dfcb3ec8ee00fe2090c8329b2ad046e81d253b25497211934981ba877cc81727
MD5 7328ee668be4dcc5243893dbf4428e4f
BLAKE2b-256 bf9fedb581982c64b35a3c7f2845622ccbfd9d100899d3566de985aa74faa592

See more details on using hashes here.

File details

Details for the file PyMetis-2023.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for PyMetis-2023.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6b623e83729848a32f58d95d7d9380030f36a68aafa20eedc6be55049a01ab7c
MD5 ae7cba2507809608ab14a5eceaa16bd8
BLAKE2b-256 bfeac68482a08adf7c785c318f40b2ffae385420d26abddb0b5b4636939798d7

See more details on using hashes here.

File details

Details for the file PyMetis-2023.1-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for PyMetis-2023.1-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 ebc2fb8609c08c5508d212d2fa989a900838153f6f38e7b559483527afa0fd3e
MD5 c173d04abc2fb7eca1e7dc1fb5e2fe83
BLAKE2b-256 60a2d4dc305f3d6d3f6b047d1b610735af918f63994e545df0bcc019ff7fafe8

See more details on using hashes here.

File details

Details for the file PyMetis-2023.1-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for PyMetis-2023.1-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 82be2023003ce856f37626f34f30acd42276c2cfe2068f3ffba028094507e514
MD5 05d75d6caf2f76e3b5b6f6bc980c92f3
BLAKE2b-256 9efb3d654d302bf9e3283556a685cff6868cde61e97367a7b410f633ac9322b2

See more details on using hashes here.

File details

Details for the file PyMetis-2023.1-cp39-cp39-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for PyMetis-2023.1-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 2962e4371847ea1059d3e9ed32f51ce7535299f31012cdfe5e2d60d253e0d022
MD5 dc3fcd1b1accf47deee0cf66c3a776b5
BLAKE2b-256 4b8bb70a06c02edcb24dbd0b16d3bd1d82c7da251099c7f5b6431cc0544a6e12

See more details on using hashes here.

File details

Details for the file PyMetis-2023.1-cp39-cp39-musllinux_1_1_i686.whl.

File metadata

File hashes

Hashes for PyMetis-2023.1-cp39-cp39-musllinux_1_1_i686.whl
Algorithm Hash digest
SHA256 f741ab2975274dc8862f818aca67c2db220225f8271fd29753b493e58aadc3a9
MD5 a198a745cb50e83caa7a32db203a057d
BLAKE2b-256 6b3d58a3dda2f841b15184f6fe31cc56aae14a194c2593a7553c49c6df0ae199

See more details on using hashes here.

File details

Details for the file PyMetis-2023.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for PyMetis-2023.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 dfb526bb76c0fa8d88d39b80b6393b9d064c9d0932e76ee02822eed9d5a67bfa
MD5 6ea06104f403d8a86f5c6dfd48c9ab21
BLAKE2b-256 97aec91af303b2c235f8f2eb4b7dabfeb719b1989fd5e9e57bd2f018ba328167

See more details on using hashes here.

File details

Details for the file PyMetis-2023.1-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for PyMetis-2023.1-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 047e1d224fe47912f4c420fd9f2b8b37834911769d80b2fc9473494573071097
MD5 d9fce1f58f9c657cedd95af4b2477d4a
BLAKE2b-256 4a9edc8c0dec72fc251c242d5ac7cd580012fe6e50902687ffff01393b2e89d4

See more details on using hashes here.

File details

Details for the file PyMetis-2023.1-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for PyMetis-2023.1-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 32c197580df6e5370b7b13aa9baf03656476e78a51130a8abb4f1974e56f78b3
MD5 cda0ca604735202bbd4e237208761689
BLAKE2b-256 02cc8207e288380ea7cfd50c95fd024d1e7c6687e5b8cc33c05227409da7fc42

See more details on using hashes here.

File details

Details for the file PyMetis-2023.1-cp38-cp38-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for PyMetis-2023.1-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 d37f0669790a29f935d9047aebbd0d657748714fb602d22bafb54be22491d897
MD5 5cd4738c3aaf4441c32c440b1aa9c96d
BLAKE2b-256 fe9cd8f41ca190f38beb467d03d615770bbad6703a303c4272a1fd1213e6937c

See more details on using hashes here.

File details

Details for the file PyMetis-2023.1-cp38-cp38-musllinux_1_1_i686.whl.

File metadata

File hashes

Hashes for PyMetis-2023.1-cp38-cp38-musllinux_1_1_i686.whl
Algorithm Hash digest
SHA256 916f40deec98455d805a140df7aa9a316d85c385fc9f259dba23f0500d533f32
MD5 2baeda2bfa966ed9d5e4d508afe72c91
BLAKE2b-256 833f4066f0d2447cb2b8a4573d8db875ff061bb062441d3cfe816473e7e3ea50

See more details on using hashes here.

File details

Details for the file PyMetis-2023.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for PyMetis-2023.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 fd0c36cc48322868ffb71c86b3f1677bd1881dfbd99016743811b6db475c24af
MD5 06c18bed0207223a3c714e3a7a73452f
BLAKE2b-256 a9aa454ee017ab453c9c8888427609423e89cbd27380e982fac41f8ed068dfa6

See more details on using hashes here.

File details

Details for the file PyMetis-2023.1-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for PyMetis-2023.1-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 1f8f68a8e8846dfe53d629e049791938740499b94bb2affb85f2bb035705f1cd
MD5 7c370aca22a5b40abc5f6dbba5fd0996
BLAKE2b-256 19c5069a0921ae505ba5283d39a3b73e30676f99fd16daec94f223ea0fee347b

See more details on using hashes here.

File details

Details for the file PyMetis-2023.1-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for PyMetis-2023.1-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 f5bd66cffb94c4be113f964a68b38d8543a46f4fe7963ac9e441296a24f6f996
MD5 ea67f5966db47cf242ca0ca5886ba71e
BLAKE2b-256 d3c6f68e26ca3c65b7807b8687442e6456659c9c3e1944402b94fb198d3c9f85

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page