Skip to content

Commit 589fa3e

Browse files
Merge pull request #14 from MatthewSZhang/dev
MNT Cython remove unnecessary memset of mask
2 parents aae8c9d + adec944 commit 589fa3e

File tree

3 files changed

+47
-50
lines changed

3 files changed

+47
-50
lines changed

fastcan/_cancorr_fast.pyx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,6 @@ cpdef int _forward_search(
155155
int index = -1
156156

157157
memset(&r2[0], 0, n_features * sizeof(floating))
158-
memset(&mask[0], False, n_features * sizeof(bint))
159158

160159
for i in range(t):
161160
if i == 0:

fastcan/_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def ols(X, y, t=1):
9797
w = X / np.linalg.norm(X, axis=0)
9898
v = y / np.linalg.norm(y)
9999
mask = np.zeros(n_features, dtype=bool)
100-
r2 = np.zeros(n_features)
100+
r2 = np.zeros(n_features, dtype=float)
101101
indices = np.zeros(t, dtype=int)
102102
scores = np.zeros(t, dtype=float)
103103

pixi.lock

Lines changed: 46 additions & 48 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)