Skip to content

Commit

Permalink
fix: ValueError: Buffer dtype mismatch, expected 'DATA_TYPE' but got …
Browse files Browse the repository at this point in the history
…'double'

need to cast to np.float_32
  • Loading branch information
jcharkow committed Nov 27, 2024
1 parent 005af6c commit 81f78bf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,4 @@ nosetests.xml

# vim
*.sw[opqrs]
*~
2 changes: 1 addition & 1 deletion pyprophet/data_handling.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ def filter_(self, idx):
def add_peak_group_rank(self):
ids = self.df.tg_num_id.values
scores = self.df.d_score.values
peak_group_ranks = rank(ids, scores)
peak_group_ranks = rank(ids, scores.astype(np.float32, copy=False))
self.df["peak_group_rank"] = peak_group_ranks

@profile
Expand Down

0 comments on commit 81f78bf

Please sign in to comment.