Showing 1 of 3 files from the diff.

@@ -72,6 +72,8 @@
Loading
72 72
    if am.format != 'lil':
73 73
        am = am.tolil(copy=False)
74 74
    sites = np.array(sites, ndmin=1)
75 +
    if len(sites) == 0:
76 +
        return []
75 77
    am_coo = am.tocoo()
76 78
    n_sites = am.shape[0]
77 79
    rows = am.rows[sites].tolist()
@@ -182,7 +184,7 @@
Loading
182 184
        if len(rows) == 0:
183 185
            return []
184 186
        neighbors = np.hstack(rows).astype(np.int64)
185 -
        n_bonds = int(im.nnz/2)
187 +
        n_bonds = int(im.nnz / 2)
186 188
        if logic in ['or', 'union', 'any']:
187 189
            neighbors = np.unique(neighbors)
188 190
        elif logic in ['xor', 'exclusive_or']:
@@ -229,8 +231,7 @@
Loading
229 231
        neighbors = np.where(neighbors)[0]
230 232
        return neighbors
231 233
    else:
232 -
        raise Exception('Either the incidence or the adjacency matrix must '
233 -
                        + 'must be specified')
234 +
        raise Exception('Either the incidence or the adjacency matrix must be specified')
234 235
235 236
236 237
def find_connected_sites(bonds, am, flatten=True, logic='or'):
@@ -313,7 +314,7 @@
Loading
313 314
        raise Exception('Specified logic is not implemented')
314 315
    if flatten is False:
315 316
        if neighbors.size:
316 -
            mask = np.zeros(shape=n_sites+1, dtype=bool)
317 +
            mask = np.zeros(shape=n_sites + 1, dtype=bool)
317 318
            mask[neighbors] = True
318 319
            temp = np.hstack((am.row[bonds], am.col[bonds])).astype(np.int64)
319 320
            temp[~mask[temp]] = -1
@@ -400,7 +401,7 @@
Loading
400 401
        N = am.shape[0]
401 402
    elif (bonds is not None) and (sites is None):
402 403
        inds = np.unique(bonds)
403 -
        N = int(am.nnz/2)
404 +
        N = int(am.nnz / 2)
404 405
    elif (bonds is not None) and (sites is not None):
405 406
        raise Exception('Only one of sites or bonds can be specified')
406 407
    else:
@@ -480,7 +481,7 @@
Loading
480 481
        row = np.append(row, conn[:, 1])
481 482
        data = np.append(data, data)
482 483
        col = np.append(col, col)
483 -
    im = sprs.coo.coo_matrix((data, (row, col)), (row.max()+1, col.max()+1))
484 +
    im = sprs.coo.coo_matrix((data, (row, col)), (row.max() + 1, col.max() + 1))
484 485
    return im
485 486
486 487
@@ -518,7 +519,7 @@
Loading
518 519
    # Scan through Delaunay triangulation to retrieve pairs
519 520
    indices, indptr = tri.vertex_neighbor_vertices
520 521
    for k in range(tri.npoints):
521 -
        lil.rows[k] = indptr[indices[k]:indices[k+1]]
522 +
        lil.rows[k] = indptr[indices[k]:indices[k + 1]]
522 523
    # Convert to coo format
523 524
    lil.data = lil.rows  # Just a dummy array to make things work properly
524 525
    coo = lil.tocoo()
Files Coverage
openpnm 86.9%
Project Totals (147 files) 86.9%
codecov-umbrella
Build #331389662 -
unittests
1
codecov:
2
  branch: dev
3

4
coverage:
5
  precision: 1
6
  round: down
7
  range: "50...100"
8

9
  status:
10
    project:
11
      default:
12
        target: auto
13
        threshold: 0.5%
14
        branches: null
15

16
    patch:
17
      default:
18
        target: auto
19
        threshold: 0.5%
20
        branches: null
21

22
comment:
23
  layout: "header, diff, changes, sunburst, uncovered"
24
  branches: null
25
  behavior: default
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading