diff --git a/deepchem/data/data_loader.py b/deepchem/data/data_loader.py index 3bcfd8e7e6..35308d4cfb 100644 --- a/deepchem/data/data_loader.py +++ b/deepchem/data/data_loader.py @@ -908,7 +908,11 @@ def _featurize_shard(self, features = [ elt for (is_valid, elt) in zip(valid_inds, features) if is_valid ] - return np.array(features), valid_inds + try: + return np.array(features), valid_inds + except ValueError as e: + logger.warning("Exception message: {}".format(e)) + return np.asarray(features, dtype=object), valid_inds class FASTALoader(DataLoader):