Skip to content

Commit

Permalink
Update nancorrmp.py
Browse files Browse the repository at this point in the history
numpy eliminated np.bool in favor of the native bool datatype. Ran on my computer and seems to work fine, otherwise broken...
  • Loading branch information
tompetrillo authored and bukson committed Sep 19, 2023
1 parent 0634ba4 commit 1eb190f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nancorrmp/nancorrmp.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def _calculate(X: ArrayLike, n_jobs: int, chunks: int, add_p_values: int) -> Uni

finite_mask_data = np.isfinite(X_array)
finite_mask_raw = RawArray(ctypes.c_bool, X_array.shape[0] * X_array.shape[1])
finite_mask_np = np.frombuffer(finite_mask_raw, dtype=np.bool).reshape(X_array.shape)
finite_mask_np = np.frombuffer(finite_mask_raw, dtype=bool).reshape(X_array.shape)
np.copyto(finite_mask_np, finite_mask_data)

X_corr = np.ndarray(shape=(X_array.shape[0], X_array.shape[0]), dtype=np.float64)
Expand Down

0 comments on commit 1eb190f

Please sign in to comment.