Skip to content
This repository was archived by the owner on Sep 4, 2024. It is now read-only.

Commit 943143b

Browse files
author
Mr-Milk
committed
update readme, reformat code
1 parent 8d432c1 commit 943143b

4 files changed

Lines changed: 5 additions & 10 deletions

File tree

.github/workflows/test.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ jobs:
1111
runs-on: ubuntu-latest
1212
strategy:
1313
matrix:
14-
os: [ubuntu-latest, windows-latest]
15-
python-version: [3.5, 3.6]
14+
os: [ubuntu-latest, windows-latest, macos-latest]
15+
python-version: [3.8]
1616

1717
steps:
1818
- uses: actions/checkout@v2

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@ from spatialentropy import leibovici_entropy
5555

5656
# set the distance cut-off to 5
5757
e = leibovici_entropy(points, types, d=5)
58-
# or choose an interval from 10-20
59-
e = leibovici_entropy(points, types, d=(10, 20))
6058
# if you want to change the base of log
6159
e = leibovici_entropy(points, types, base=2)
6260

spatialentropy/_leibovici_entropy.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,11 @@ def leibovici(points: Union[List[float], np.ndarray],
3232
base = np.e
3333

3434
if d is None:
35-
d1 = 0
36-
d2 = 10
35+
d = 10
3736
elif isinstance(d, (int, float)):
38-
d1 = 0
39-
d2 = d
37+
pass
4038
else:
41-
raise ValueError("d could either be a number or an interval.")
39+
raise TypeError("d should be a number.")
4240

4341
points = [tuple(i) for i in points]
4442
if isinstance(types[0], str):

spatialentropy/_utils.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ def get_pair(types, neighbors):
113113

114114

115115
def get_pair_count(pair, order):
116-
117116
pairs_counts = Counter(pair)
118117

119118
if not order:

0 commit comments

Comments
 (0)