Skip to content
This repository has been archived by the owner on Jan 2, 2025. It is now read-only.

Commit

Permalink
upd encode_labels in mapped
Browse files Browse the repository at this point in the history
  • Loading branch information
Koncopd committed Feb 19, 2024
1 parent 75f8a8f commit 4963402
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lnschema_core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -2064,7 +2064,7 @@ def mapped(
self,
label_keys: Optional[Union[str, List[str]]] = None,
join: Optional[Literal["inner", "outer"]] = "inner",
encode_labels: bool = True,
encode_labels: Union[bool, List[str]] = True,
unknown_label: Optional[Union[str, Dict[str, str]]] = None,
cache_categories: bool = True,
parallel: bool = False,
Expand All @@ -2083,8 +2083,10 @@ def mapped(
join: `"inner"` or `"outer"` virtual joins. If ``None`` is passed,
does not join.
encode_labels: Encode labels into integers.
Can be a list with elements from ``label_keys```.
unknown_label: Encode this label to -1.
Can be a dictionary with keys from ``label_keys``.
Can be a dictionary with keys from ``label_keys`` if ``encode_labels=True```
or from ``encode_labels`` if it is a list.
cache_categories: Enable caching categories of ``label_keys`` for faster access.
parallel: Enable sampling with multiple processes.
dtype: Convert numpy arrays from ``.X`` to this dtype on selection.
Expand Down

0 comments on commit 4963402

Please sign in to comment.