ageron / ageron/handson-ml2

Chapter 2-Why use bitwise and with crc32

未關閉
#360 3 則留言 2 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Jupyter Notebook
星號
30k
分支
13.1k
PR 合併指標
30 天內沒有已合併 PR

描述

Hi,
I'm not a pro to python and I am wondering why we use bitwise and on page 52.

```python
def test_set_check(identifier, test_ratio):
return crc32(np.int64(identifier)) & 0xffffffff < test_ratio*2**32
```

could someone explain me the purpose of this?
Thank you.

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。