Skip to main content

Smart local moving (SLM) community detection in Python/C++, modeled on the Java version on https://github.com/mneedham/slm.

from slmpy import ModularityOptimzer

edges = [
         [0, 1],
         [0, 2],
         [0, 3],
         [1, 2],
         [1, 3],
         [2, 3],
         [3, 4],
         [4, 5],
         [4, 6],
         [5, 6],
         [7, 8],
        ]

mo = ModularityOptimzer(edges)
mo.fixed_nodes = [0, 4]  # This fixes nodes 0 and 4 to be in different communities
communities = mo(algorithm='smart_local_moving')

# Check answer
assert((communities == [0, 0, 0, 0, 1, 1, 1]).all())

Metadata

Release files for slmpy 0.3.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for slmpy 0.3.3
File Size Uploaded Provenance Actions
slmpy-0.3.3.tar.gz 12.2 kB Without provenance Details for slmpy-0.3.3.tar.gz

Release files / slmpy-0.3.3.tar.gz

Download URL slmpy-0.3.3.tar.gz
Size 12.2 kB
Tags Source
SHA-256 checksum
How to use checksums
3d3368636fe1132f3677faef668c9f7a5ba0a2eae13385bd7501577cbcd4bfba
BLAKE2b-256 checksum
How to use checksums
4aaf2f8d395df8297ad8209c5cb139d7abf45081b5583c2a972f8c6b38b51e17
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.1

Security for slmpy 0.3.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.3.3 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page