We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fd8a66e commit 9a6b712Copy full SHA for 9a6b712
pyrdf2vec/samplers/wide.py
@@ -81,6 +81,7 @@ def get_weight(self, hop: Hop) -> float:
81
Args:
82
hop: The hop of a vertex in a (predicate, object) form to get the
83
weight.
84
+
85
Returns:
86
The weight of a given hop.
87
@@ -89,7 +90,7 @@ def get_weight(self, hop: Hop) -> float:
89
90
without the sampling strategy having been trained.
91
92
"""
- if not (self._pred_degs and self._obj_degs and self._neighbor_counts):
93
+ if self._pred_degs or self._obj_degs or self._neighbor_counts:
94
raise ValueError(
95
"You must call the `fit(kg)` method before get the weight of"
96
+ " a hop."
0 commit comments