Skip to content

Commit

Permalink
FR: Divide into double, not Py_ssize_t
Browse files Browse the repository at this point in the history
  • Loading branch information
janezd committed Oct 26, 2023
1 parent 3cd58f9 commit 14be701
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions orangecontrib/network/network/layout/_fr_layout.pyx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#cython: boundscheck=False
#cython: wraparound=False
#cython: initializedcheck=False
#cython: cdivision=True
#cython: embedsignature=True
#cython: infer_types=False
#cython: language_level=3
Expand Down Expand Up @@ -70,7 +69,7 @@ cpdef void repulse_sampled(arr_f2_t pos, arr_i1_t sample,
Py_ssize_t i, j, s

Py_ssize_t sample_size = sample.shape[0]
Py_ssize_t inv_sample_ratio = n_nodes / sample_size
double inv_sample_ratio = n_nodes / sample_size
double k2 = sqr(k)

for i in range(n_nodes):
Expand Down Expand Up @@ -168,9 +167,6 @@ def fruchterman_reingold_step(arr_f2_t pos,
Py_ssize_t n_nodes = pos.shape[0]
Py_ssize_t n_dim = pos.shape[1]

Py_ssize_t sample_size = sample.shape[0]
Py_ssize_t inv_sample_ratio = n_nodes / sample_size

with nogil:
disp[:, :] = 0
attract(pos, edge_src, edge_dst, edge_weights, k, disp)
Expand Down

0 comments on commit 14be701

Please sign in to comment.