torcharrow.functional.has_id_overlap¶
- torcharrow.functional.has_id_overlap(input_ids: ListColumn, matching_ids: ListColumn)¶
如果兩個輸入欄位重疊,則返回 1.0,否則返回 0.0
- 參數:
input_ids (第一個 ID 列表) –
matching_ids (第二個 ID 列表) –
範例
>>> import torcharrow as ta >>> from torcharrow import functional >>> input_ids = ta.column([[1, 2, 3],[5,8],[13]]) >>> matching_ids = ta.column([[1],[2,3],[13]]) >>> functional.has_id_overlap(input_ids, matching_ids) 0 1 1 0 2 1 dtype: Float32(nullable=True), length: 3, null_count: 0