Skip to content

Commit

Permalink
Merge pull request #106 from mkanai/fix_float_mk
Browse files Browse the repository at this point in the history
Replace np.float_ with np.float64
  • Loading branch information
KangchengHou authored Oct 18, 2024
2 parents 8097704 + 2e15c33 commit bc1e77b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scdrs/method.py
Original file line number Diff line number Diff line change
Expand Up @@ -1052,14 +1052,14 @@ def gearys_c(adata, vals):
"""
graph = adata.obsp["connectivities"]
assert graph.shape[0] == graph.shape[1]
graph_data = graph.data.astype(np.float_, copy=False)
graph_data = graph.data.astype(np.float64, copy=False)
assert graph.shape[0] == vals.shape[0]
assert np.ndim(vals) == 1

W = graph_data.sum()
N = len(graph.indptr) - 1
vals_bar = vals.mean()
vals = vals.astype(np.float_)
vals = vals.astype(np.float64)

# numerators
total = 0.0
Expand Down

0 comments on commit bc1e77b

Please sign in to comment.