Skip to content

Commit 2b90044

Browse files
committed
Cleanup
1 parent b890c1b commit 2b90044

6 files changed

Lines changed: 25 additions & 31 deletions

File tree

src/diffupy/__init__.py

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,3 @@
11
# -*- coding: utf-8 -*-
22

3-
"""
4-
The goal of this package is to re-implement the Diffusion algorithm described in ... in Python.
5-
6-
Installation
7-
------------
8-
1. ``diffupy`` can be installed with the following commmands:
9-
10-
.. code-block:: sh
11-
12-
python3 -m pip install ...
13-
14-
2. or in editable mode with:
15-
16-
.. code-block:: sh
17-
18-
git clone ..
19-
20-
.. code-block:: sh
21-
22-
cd diffupy
23-
24-
.. code-block:: sh
25-
26-
python3 -m pip install -e .
27-
28-
How to use
29-
----------
30-
31-
"""
3+
"""DiffuPy."""

src/diffupy/constants.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# -*- coding: utf-8 -*-
2+
13
"""Constants of diffupy."""
24

35
import os

src/diffupy/diffuse.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,16 @@
1010
import numpy as np
1111

1212
from .diffuse_raw import diffuse_raw
13+
from .matrix import Matrix
1314
from .utils import get_label_list_graph
1415
from .validate_input import _validate_scores
1516

16-
from .matrix import Matrix
17-
1817
log = logging.getLogger(__name__)
1918

19+
__all__ = [
20+
'diffuse',
21+
]
22+
2023

2124
def diffuse(
2225
input_scores: Matrix,

src/diffupy/diffuse_raw.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@
1313

1414
logger = logging.getLogger()
1515

16+
__all__ = [
17+
'calculate_scores',
18+
'diffuse_raw',
19+
]
20+
1621

1722
def calculate_scores(
1823
col_ind: int,

src/diffupy/kernels.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,14 @@
1717
log = logging.getLogger(__name__)
1818

1919

20+
__all__ = [
21+
'diffusion_kernel',
22+
'commute_time_kernel',
23+
'inverse_cosine_kernel',
24+
'regularised_laplacian_kernel',
25+
'p_step_kernel',
26+
]
27+
2028
def commute_time_kernel(graph: nx.Graph, normalized: bool = False) -> Matrix:
2129
"""Compute the commute-time kernel, which is the expected time of going back and forth between a couple of nodes.
2230
If the network is connected, then the commuted time kernel will be totally dense, therefore reflecting global

src/diffupy/matrix.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212

1313
log = logging.getLogger(__name__)
1414

15+
__all__ = [
16+
'Matrix',
17+
'LaplacianMatrix',
18+
]
1519

1620
class Matrix:
1721
"""Matrix class."""

0 commit comments

Comments
 (0)