Skip to content

Commit 0a0266f

Browse files
committed
refine doc string and fix type hint
1 parent 3f12ed8 commit 0a0266f

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

cebra/integrations/sklearn/cebra.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -600,8 +600,12 @@ def num_sessions(self) -> Optional[int]:
600600
return self.num_sessions_
601601

602602
@property
603-
def num_negatives_(self) -> int:
604-
"""The number of negative examples."""
603+
def num_negatives_(self) -> Optional[int]:
604+
"""The number of negative examples.
605+
606+
If the model is trained using the full dataset (``batch_size`` is ``None``), this
607+
function will return ``None``.
608+
"""
605609
if self.num_negatives is None:
606610
return self.batch_size
607611
return self.num_negatives

0 commit comments

Comments
 (0)