{"id":18924035,"url":"https://github.com/gravins/numgraph","last_synced_at":"2025-06-10T18:32:32.825Z","repository":{"id":39920999,"uuid":"431425639","full_name":"gravins/NumGraph","owner":"gravins","description":"Synthetic graph generator","archived":false,"fork":false,"pushed_at":"2023-11-07T16:29:11.000Z","size":596,"stargazers_count":12,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-22T05:23:43.798Z","etag":null,"topics":["graphs","numpy","python"],"latest_commit_sha":null,"homepage":"https://numgraph.readthedocs.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gravins.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-11-24T09:40:44.000Z","updated_at":"2024-09-17T15:04:30.000Z","dependencies_parsed_at":"2025-04-15T12:50:09.900Z","dependency_job_id":null,"html_url":"https://github.com/gravins/NumGraph","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gravins%2FNumGraph","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gravins%2FNumGraph/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gravins%2FNumGraph/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gravins%2FNumGraph/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gravins","download_url":"https://codeload.github.com/gravins/NumGraph/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gravins%2FNumGraph/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259124212,"owners_count":22808892,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["graphs","numpy","python"],"created_at":"2024-11-08T11:05:24.443Z","updated_at":"2025-06-10T18:32:32.800Z","avatar_url":"https://github.com/gravins.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[pypi-image]: https://github.com/gravins/NumGraph/blob/main/docs/source/_static/img/NumGraph_logo.svg\n[pypi-url]: https://pypi.org/project/numgraph/\n\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"30%\" src=\"https://github.com/gravins/NumGraph/blob/main/docs/source/_static/img/NumGraph_logo.svg\" /\u003e\n\u003c/p\u003e\n\n\n# NumGraph\n#### Read the [Documentation](https://numgraph.readthedocs.io/en/latest/index.html)\n\n**Num(py)Graph** is a library for synthetic graph generation. The main principle of NumGraph is to be a lightweight library (i.e., ``numpy`` is the only dependency) that generates graphs from a broad range of distributions. Indeed, It implements several graph distributions in both the static and temporal domain. \n\n\n## Implemented distributions\n### Static Graphs\n- Star graph\n- Clique\n- Two-dimensional rectangular grid lattice graph\n- Random Tree\n- Erdos Renyi\n- Barabasi Albert\n- Stochastic Block Model\n\n### Temporal Graphs\n- Susceptible-Infected Dissemination Process Simulation\n- Heat diffusion over a graph (closed form solution)\n- Generic Euler's method approximation of a diffusion process over a graph\n\n## Installation\n\n``` python3 -m pip install numgraph ```\n\n## Usage\n```python\n\n\u003e\u003e\u003e from numgraph import star_coo, star_full\n\u003e\u003e\u003e coo_matrix, coo_weights = star_coo(num_nodes=5, weighted=True)\n\u003e\u003e\u003e print(coo_matrix)\narray([[0, 1],\n       [0, 2],\n       [0, 3],\n       [0, 4],\n       [1, 0],\n       [2, 0],\n       [3, 0],\n       [4, 0]]\n\n\u003e\u003e\u003e print(coo_weights)\narray([[0.89292422],\n       [0.3743427 ],\n       [0.32810002],\n       [0.97663266],\n       [0.74940571],\n       [0.89292422],\n       [0.3743427 ],\n       [0.32810002],\n       [0.97663266],\n       [0.74940571]])\n\n\u003e\u003e\u003e adj_matrix = star_full(num_nodes=5, weighted=True)\n\u003e\u003e\u003e print(adj_matrix)\narray([[0.        , 0.72912008, 0.33964166, 0.30968042, 0.08774328],\n       [0.72912008, 0.        , 0.        , 0.        , 0.        ],\n       [0.33964166, 0.        , 0.        , 0.        , 0.        ],\n       [0.30968042, 0.        , 0.        , 0.        , 0.        ],\n       [0.08774328, 0.        , 0.        , 0.        , 0.        ]])\n\n```\n\nOther examples can be found in ``` test/plot_static.py ``` and ``` test/plot_temporal.py ```.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgravins%2Fnumgraph","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgravins%2Fnumgraph","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgravins%2Fnumgraph/lists"}