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.1.tar.gz (343.7 kB view details)

Uploaded Source

Built Distributions

PyMetis-2023.1.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (305.6 kB view details)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

PyMetis-2023.1.1-pp39-pypy39_pp73-manylinux_2_17_i686.manylinux2014_i686.whl (376.6 kB view details)

Uploaded PyPy manylinux: glibc 2.17+ i686

PyMetis-2023.1.1-pp39-pypy39_pp73-macosx_10_9_x86_64.whl (288.7 kB view details)

Uploaded PyPy macOS 10.9+ x86-64

PyMetis-2023.1.1-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (306.2 kB view details)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

PyMetis-2023.1.1-pp38-pypy38_pp73-manylinux_2_17_i686.manylinux2014_i686.whl (377.2 kB view details)

Uploaded PyPy manylinux: glibc 2.17+ i686

PyMetis-2023.1.1-pp38-pypy38_pp73-macosx_10_9_x86_64.whl (288.8 kB view details)

Uploaded PyPy macOS 10.9+ x86-64

PyMetis-2023.1.1-cp311-cp311-musllinux_1_1_x86_64.whl (851.4 kB view details)

Uploaded CPython 3.11 musllinux: musl 1.1+ x86-64

PyMetis-2023.1.1-cp311-cp311-musllinux_1_1_i686.whl (957.3 kB view details)

Uploaded CPython 3.11 musllinux: musl 1.1+ i686

PyMetis-2023.1.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (331.4 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

PyMetis-2023.1.1-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl (407.5 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ i686

PyMetis-2023.1.1-cp311-cp311-macosx_10_9_x86_64.whl (295.5 kB view details)

Uploaded CPython 3.11 macOS 10.9+ x86-64

PyMetis-2023.1.1-cp310-cp310-musllinux_1_1_x86_64.whl (850.3 kB view details)

Uploaded CPython 3.10 musllinux: musl 1.1+ x86-64

PyMetis-2023.1.1-cp310-cp310-musllinux_1_1_i686.whl (956.8 kB view details)

Uploaded CPython 3.10 musllinux: musl 1.1+ i686

PyMetis-2023.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (330.0 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

PyMetis-2023.1.1-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl (406.9 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ i686

PyMetis-2023.1.1-cp310-cp310-macosx_10_9_x86_64.whl (294.1 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

PyMetis-2023.1.1-cp39-cp39-musllinux_1_1_x86_64.whl (850.5 kB view details)

Uploaded CPython 3.9 musllinux: musl 1.1+ x86-64

PyMetis-2023.1.1-cp39-cp39-musllinux_1_1_i686.whl (957.2 kB view details)

Uploaded CPython 3.9 musllinux: musl 1.1+ i686

PyMetis-2023.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (330.0 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

PyMetis-2023.1.1-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl (407.1 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ i686

PyMetis-2023.1.1-cp39-cp39-macosx_10_9_x86_64.whl (294.3 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

PyMetis-2023.1.1-cp38-cp38-musllinux_1_1_x86_64.whl (850.1 kB view details)

Uploaded CPython 3.8 musllinux: musl 1.1+ x86-64

PyMetis-2023.1.1-cp38-cp38-musllinux_1_1_i686.whl (956.8 kB view details)

Uploaded CPython 3.8 musllinux: musl 1.1+ i686

PyMetis-2023.1.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (329.8 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

PyMetis-2023.1.1-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl (406.9 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ i686

PyMetis-2023.1.1-cp38-cp38-macosx_10_9_x86_64.whl (294.0 kB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

File details

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

File metadata

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

File hashes

Hashes for PyMetis-2023.1.1.tar.gz
Algorithm Hash digest
SHA256 dc065dbb782ee5b1816341488e68eda74ffe320ae1c9efd35ee5e5d6da119a3f
MD5 cf764dfde69b7e4c559b521e1537704b
BLAKE2b-256 f8c15a9836c6d29d86fbb637c3dd96cb9b639137dbcd0c677779366dd7b98ce4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for PyMetis-2023.1.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f4d4c947210fb9910f8e5e9abce19581f5cf98f6d38fbad2521a0016807feb03
MD5 7c2282dbb9d2e1825856610d6f72b85e
BLAKE2b-256 4275f7a673b8951e2e8f48940bdf2322662e4b5e5f80cf78197f5d5bf89d2768

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for PyMetis-2023.1.1-pp39-pypy39_pp73-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 d3a152bf3ccb9ac4516d7c55bd307606d0d1071985f3f07d3a5c695c1886ea6e
MD5 e53324875ffd0ad8bd08cf9a484e812a
BLAKE2b-256 d08f708d77df26191dfd0f4e376dffc91dee4e2762634b4d37ec08a93e52df4d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for PyMetis-2023.1.1-pp39-pypy39_pp73-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 38a61f0e8380d0242f246d6bbae4eaa476dde5ea41148a92784092397566f266
MD5 5d71f90a7d620871a1093cd70888bfa9
BLAKE2b-256 40d3a56a68a52f3383aa25e0a1256791913b7c0f16f0a0698112c5f87a61c31c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for PyMetis-2023.1.1-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 405165b7bd5ccb233a90f1db322f7a1d3c78782a2df02b18a6d156670a0ffb5d
MD5 c9717f93bcf8dba8a5658fb2bbbbbf4d
BLAKE2b-256 a5b59368501dff9c02bd68e26fffc4f2480f3d7a6f5b57e6b2aa6f269d53f220

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for PyMetis-2023.1.1-pp38-pypy38_pp73-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 032c0a79516ea9a37e5d7477b25940ca013adf9972637f4fca968727ec54e1fe
MD5 68a96dd072285e6f59bea795e8e95623
BLAKE2b-256 8f266214349d1ec3c75d570f9de246aed03f49fb312230d26130c44c1002b2c7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for PyMetis-2023.1.1-pp38-pypy38_pp73-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 84291539d6e0ef50acfb5c79ded74b89ad51d9ed7cf1d24212eafa3676be3be0
MD5 aa92739f35736e707fd6cb3d31a8f533
BLAKE2b-256 dcf8c43942c7023cfa9bd709f75e58e40c0443962e1c94a5fe813619d63120ee

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for PyMetis-2023.1.1-cp311-cp311-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 8d159cc60d5eb2133615387eebc24b998586542268e76bf4293ca881a0cf7433
MD5 35b2847a7749a24a777248f7af0b1ba1
BLAKE2b-256 932344e173273cb7c49008bfdced563b3c8a945ecbfeefe7342b73408598331c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for PyMetis-2023.1.1-cp311-cp311-musllinux_1_1_i686.whl
Algorithm Hash digest
SHA256 b7e04ae6d9e36b756255e0dfc1f7ecb83b16d1ca0500dc6f0d4b9e37177843b1
MD5 bffecb4008a662e2b47d841dd6f0dcd5
BLAKE2b-256 8892e03bd5b11a040ac1eab329159f859a86a623092e67051373ef47e17cc635

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for PyMetis-2023.1.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 af4d537e20c05e71a598c1cfd7d6e1803a1d6836f3e286223e1afbf168e7f1f7
MD5 f2a858eb45f97f1d885e58c3493082f1
BLAKE2b-256 03a8d060d14f7bd9c57c45f2e6e50b594a8f179eb746ca5e47f2003c6bf32f6f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for PyMetis-2023.1.1-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 3c6b8073be3bb4e42f8d9a29c457457bdc70d407d152096e4ba4481e4be7a2d1
MD5 53f302c83d9d6f99e62cc4fd301f4175
BLAKE2b-256 d805d2fdfac8bade8bb98cdd159b061e36f2b17ae4dfbc3fbee7aa96caf9c043

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for PyMetis-2023.1.1-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 73b5d62e8841fa591015ffdf216dc19840e4d165dcbe998c1d393fb6c7f9dc24
MD5 16f0ad683692fb65c50baed98b118e1c
BLAKE2b-256 1b176a7fe7191786e8062470abfedd228554dbdf7970b3e1ca6ac9475845f11d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for PyMetis-2023.1.1-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 657cb1cd44b29e6725a58e4724158727ec2842a9751b9a15691c74531aa751f0
MD5 c905f8971b435294d18395bf6e6657a1
BLAKE2b-256 251bacdc423c1f130a8c0806a0140064137a55f3a8918590d41f8e1408bfa9fd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for PyMetis-2023.1.1-cp310-cp310-musllinux_1_1_i686.whl
Algorithm Hash digest
SHA256 8308973f0d854c7e733820bb641ff0b52bab0f29232e17641443e0da9002bb3b
MD5 8c2f3259d6e853a26cae16a09906a275
BLAKE2b-256 bdcc40ab8c44da58eaeed8a3ea35c8cd5d34f7a5e8225d1bcfb61786e0521017

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for PyMetis-2023.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 47286e2d6ec9f9c3f3a79c851e07178f4be55fa639015f661f7d22f6b88aabbd
MD5 be1f2e949d4695355a7bbfff7c4809d2
BLAKE2b-256 8889bde2847a7004a2b2fba0e620a46de76d7cad3cac2159a5c7c7ddb1d65020

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for PyMetis-2023.1.1-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 d687fa47e5967ff1cc9aaa243c1af75c1bb20694a47edf6c4b5d949679d3fe31
MD5 ef8fb743310d603e02edc0fb9a759ed9
BLAKE2b-256 084b73de7bd858859e203d3fb9fede3ae8e5136deeb8442d4ba60d3ba4dd1b2b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for PyMetis-2023.1.1-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 171f5d9c9580e308e7db074f1be7c22be4ba70246f00717f5c2d66fe6b31d3ce
MD5 a8946d2d828a6cf37757fe286202343d
BLAKE2b-256 bbdc46d9807a98c96739d254e050287df7a14bd1aa7592a3b12805b8af0a4603

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for PyMetis-2023.1.1-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 a60e4b74487b40b64bac187e9acfcb7b0eaea728af037db5ffcc8ffda1b91d5d
MD5 dee9eb220bfbe5fa0e24729a8cb3c5a5
BLAKE2b-256 5411878d9e5bf55a2093408974ee781960cb7ab53e0e7b194022963b6ddaa108

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for PyMetis-2023.1.1-cp39-cp39-musllinux_1_1_i686.whl
Algorithm Hash digest
SHA256 6f46a9a4b93d32d52e5926a40aa0c630cb3c4c977f9ad8b5ce4a30f075f136f8
MD5 083af29ef1271da6cf76068f9cd6920f
BLAKE2b-256 43ce4899c7c4753df6a640d5bf282a662c267bdf097a2981969a7877369777c4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for PyMetis-2023.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bd7fb0421c4d2960ef70bb944a80513592b24b4f98794290549ad887a284f214
MD5 396a94472d8d18dc826e555aa8d95216
BLAKE2b-256 af8ec88e5e7bc32f15c7063d77b19f4c7230b971a445cc19cdbd5f28fe8b8c54

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for PyMetis-2023.1.1-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 533d4b0ba67692a376eb38aaf413ff30601f377299b11c088d21c734beb316ba
MD5 8dc7ed198dcd5f8e3896fee4a2113f9a
BLAKE2b-256 70407cc1f7a8ef3f82c9bd644dc399fe294069c55e897e576704d9750d6d98fa

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for PyMetis-2023.1.1-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 38f27d8fb149a615e9511a9fb97cd54fe1c65da615e79dce443a50bf6b577d3c
MD5 6b1a2ef6fe8f8c20d887ec4af9a7efdf
BLAKE2b-256 fda10e5aaf8ed4c6228be60c5abc643a46e1db41ec7a9c5d43b636911e1dacb1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for PyMetis-2023.1.1-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 b7803093a0b029b28b675f73c3291bdfd65e024e7185c79a5885424544bb6ac9
MD5 5d72e42f6198891540773b96ddaa2909
BLAKE2b-256 4518b55451edb21458f0448911ba964d2a19b248c8975055f6ff928a934cfa9a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for PyMetis-2023.1.1-cp38-cp38-musllinux_1_1_i686.whl
Algorithm Hash digest
SHA256 1c33a2cbb9df3897b21181ee9035e3861967e466bfcc9ec07855993224145707
MD5 42d1f80398c08d9887d308de3e882e7e
BLAKE2b-256 898d71aafbb3483a2e80799c09923fc716e38985e750115f3eca8e69e2970d4c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for PyMetis-2023.1.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c52966fd68dcd1421fa55710ea3a9244568447a8497a6f47030f683749f16da2
MD5 bf53bfdde7b1fa9236c701c02136ceec
BLAKE2b-256 d2ce0cba29aec45c633068c37ae68b22802806b28b853c591164602185076fb4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for PyMetis-2023.1.1-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 e480fc8211121846246b418a0ecdf74b62434e79207d8cf69e170764134bcc37
MD5 ff1ee76d5b316baf04ca8bd3492270d5
BLAKE2b-256 cb59e93e92ccb541ac86ec74c16e1c219556006a2ae84811a79ddd50ea85b767

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for PyMetis-2023.1.1-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 0bc03df667a23d2684d8ad0e37c1844bbc04e8317c2b01d4139bc59b91c701bb
MD5 87264a42b24f308478984ad670912d97
BLAKE2b-256 f0cb32064065bdf4ea822e5cd1e8d404bc0923be86f2a43b91509e8e4d893d18

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