Skip to main content

Smart local moving (SLM) community detection in Python/C++

Project description

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

import numpy as np
import slmpy

# Load example data
edges = np.loadtxt(
        'data/karate_club.tsv',
        dtype=np.uint64)

# Instantiate class
c = slmpy.SmartLocalMoving(
        data=data,

# Call subroutine
clusters = c()

# Check result
assert (clusters == [[2], [3], [0], [1]]).all()

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

slmpy-0.3.0.tar.gz (11.9 kB view hashes)

Uploaded Source

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