Skip to content

Commit

Permalink
dimension fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ncfrey committed Mar 9, 2021
1 parent 698519d commit 542fafd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 3 additions & 2 deletions deepchem/feat/complex_featurizers/rdkit_grid_featurizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,7 @@ def _featurize(self, complex):
else:
features_dict[system_id] = np.concatenate(feature_arrays, axis=-1)

# TODO(rbharath): Is this squeeze OK?
features = np.squeeze(np.array(list(features_dict.values())))
features = np.array(list(features_dict.values()))
if self.nb_rotations == 0: # squeeze out axis with dimension 1
features = np.squeeze(features, axis=0)
return features
2 changes: 2 additions & 0 deletions deepchem/feat/tests/test_rdkit_grid_features.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@ def test_custom_cutoffs(self):
def test_rotations(self):
featurizer = RdkitGridFeaturizer(
nb_rotations=3,
box_width=16.,
voxel_width=1.,
feature_types=['voxel_combined'],
flatten=False,
sanitize=True)
Expand Down

0 comments on commit 542fafd

Please sign in to comment.