From fe94b819a91c0d212aeecf61d6c644d0ec573de2 Mon Sep 17 00:00:00 2001 From: Tim O'Donnell <timodonnell@gmail.com> Date: Sat, 24 Feb 2018 13:16:02 -0500 Subject: [PATCH] attempt fix --- mhcflurry/select_allele_specific_models_command.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mhcflurry/select_allele_specific_models_command.py b/mhcflurry/select_allele_specific_models_command.py index ef947715..045c4fee 100644 --- a/mhcflurry/select_allele_specific_models_command.py +++ b/mhcflurry/select_allele_specific_models_command.py @@ -661,7 +661,8 @@ class MassSpecModelSelector(object): else: full_matrix = hit_matrix - full_matrix = full_matrix.sample(frac=1.0).astype(float) + if len(full_matrix) > 0: + full_matrix = full_matrix.sample(frac=1.0).astype(float) self.df = full_matrix self.predictor = predictor -- GitLab