Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/compomics/molexpress into p…
Browse files Browse the repository at this point in the history
…yproject
  • Loading branch information
RalfG committed Apr 11, 2024
2 parents 955040e + 9a88c5d commit b1451bc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion molexpress/datasets/encoders.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,10 @@ def __call__(self, molecule: types.Molecule) -> np.ndarray:
return {"edge_src": edge_src, "edge_dst": edge_dst}

if molecule.GetNumBonds() == 0:
edge_state = np.zeros(shape=(0, self.output_dim), dtype=self.output_dtype)
edge_state = np.zeros(
shape=(0, self.output_dim + int(self.self_loops)),
dtype=self.output_dtype
)
return {
"edge_src": edge_src,
"edge_dst": edge_dst,
Expand Down

0 comments on commit b1451bc

Please sign in to comment.