Skip to content

Commit 81f78bf

Browse files
committed
fix: ValueError: Buffer dtype mismatch, expected 'DATA_TYPE' but got 'double'
need to cast to np.float_32
1 parent 005af6c commit 81f78bf

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,4 @@ nosetests.xml
3636

3737
# vim
3838
*.sw[opqrs]
39+
*~

pyprophet/data_handling.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ def filter_(self, idx):
360360
def add_peak_group_rank(self):
361361
ids = self.df.tg_num_id.values
362362
scores = self.df.d_score.values
363-
peak_group_ranks = rank(ids, scores)
363+
peak_group_ranks = rank(ids, scores.astype(np.float32, copy=False))
364364
self.df["peak_group_rank"] = peak_group_ranks
365365

366366
@profile

0 commit comments

Comments
 (0)