mlnlib 0.2.38__tar.gz → 0.2.39__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {mlnlib-0.2.38/src/mlnlib.egg-info → mlnlib-0.2.39}/PKG-INFO +3 -2
- {mlnlib-0.2.38 → mlnlib-0.2.39}/pyproject.toml +1 -1
- {mlnlib-0.2.38 → mlnlib-0.2.39}/src/mlnlib/mln.py +5 -7
- {mlnlib-0.2.38 → mlnlib-0.2.39/src/mlnlib.egg-info}/PKG-INFO +3 -2
- {mlnlib-0.2.38 → mlnlib-0.2.39}/LICENSE.md +0 -0
- {mlnlib-0.2.38 → mlnlib-0.2.39}/README.md +0 -0
- {mlnlib-0.2.38 → mlnlib-0.2.39}/setup.cfg +0 -0
- {mlnlib-0.2.38 → mlnlib-0.2.39}/src/mlnlib/preparation.py +0 -0
- {mlnlib-0.2.38 → mlnlib-0.2.39}/src/mlnlib.egg-info/SOURCES.txt +0 -0
- {mlnlib-0.2.38 → mlnlib-0.2.39}/src/mlnlib.egg-info/dependency_links.txt +0 -0
- {mlnlib-0.2.38 → mlnlib-0.2.39}/src/mlnlib.egg-info/requires.txt +0 -0
- {mlnlib-0.2.38 → mlnlib-0.2.39}/src/mlnlib.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: mlnlib
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.39
|
|
4
4
|
Summary: Memory-efficient library for loading and working with large unweighted multilayer networks.
|
|
5
5
|
Author-email: Eszter Bokányi <e.bokanyi@uva.nl>
|
|
6
6
|
Project-URL: Homepage, https://github.com/popnet-io/popnet_mln
|
|
@@ -17,6 +17,7 @@ Requires-Dist: numpy>=1.20.3
|
|
|
17
17
|
Requires-Dist: python-igraph>=0.9.9
|
|
18
18
|
Requires-Dist: networkx>=3.0
|
|
19
19
|
Requires-Dist: scipy>=1.10.1
|
|
20
|
+
Dynamic: license-file
|
|
20
21
|
|
|
21
22
|
# MLN
|
|
22
23
|
|
|
@@ -543,7 +543,6 @@ class MultiLayerNetwork:
|
|
|
543
543
|
idx[nodes_selected] = True
|
|
544
544
|
|
|
545
545
|
if keep_node_alignment:
|
|
546
|
-
print("Getting indices...")
|
|
547
546
|
i,j = self.A.nonzero()
|
|
548
547
|
test = np.isin(i,nodes_selected) & np.isin(j,nodes_selected)
|
|
549
548
|
selected_i = i[test]
|
|
@@ -552,25 +551,24 @@ class MultiLayerNetwork:
|
|
|
552
551
|
del j
|
|
553
552
|
selected_data = self.A.data[test]
|
|
554
553
|
del test
|
|
555
|
-
print("Done.")
|
|
556
|
-
print("Constructing larger matrix...")
|
|
557
554
|
A_selected = csr_matrix((selected_data,(selected_i,selected_j)),shape=(self.N,self.N),dtype=self.A.dtype)
|
|
558
|
-
|
|
559
|
-
print("Constructing nodes...")
|
|
555
|
+
# keep full node dataframe
|
|
560
556
|
if self.use_polars:
|
|
561
557
|
nodes_selected = self.nodes.clone()
|
|
562
558
|
else:
|
|
563
559
|
nodes_selected = self.nodes.copy()
|
|
564
|
-
|
|
565
|
-
|
|
560
|
+
# filter down active nodes
|
|
561
|
+
nodes_selected["active"] &= idx
|
|
566
562
|
else:
|
|
567
563
|
# slicing the adjacency matrix
|
|
568
564
|
A_selected = self.A[idx,:][:,idx]
|
|
569
565
|
# slicing the attribute table
|
|
570
566
|
if self.use_polars:
|
|
571
567
|
nodes_selected = self.nodes.filter(idx)
|
|
568
|
+
nodes_selected["id"] = np.arange(sum(idx))
|
|
572
569
|
else:
|
|
573
570
|
nodes_selected = self.nodes.iloc[nodes_selected].reset_index(drop=True)
|
|
571
|
+
nodes_selected["id"] = nodes_selected.index
|
|
574
572
|
else:
|
|
575
573
|
A_selected = deepcopy(self.A)
|
|
576
574
|
nodes_selected = self.nodes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: mlnlib
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.39
|
|
4
4
|
Summary: Memory-efficient library for loading and working with large unweighted multilayer networks.
|
|
5
5
|
Author-email: Eszter Bokányi <e.bokanyi@uva.nl>
|
|
6
6
|
Project-URL: Homepage, https://github.com/popnet-io/popnet_mln
|
|
@@ -17,6 +17,7 @@ Requires-Dist: numpy>=1.20.3
|
|
|
17
17
|
Requires-Dist: python-igraph>=0.9.9
|
|
18
18
|
Requires-Dist: networkx>=3.0
|
|
19
19
|
Requires-Dist: scipy>=1.10.1
|
|
20
|
+
Dynamic: license-file
|
|
20
21
|
|
|
21
22
|
# MLN
|
|
22
23
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|