2
numpy的版本1.9.0numpy的位運算錯誤
1 & (2**63)
0
np.bitwise_and(1, 2**63)
TypeError: ufunc 'bitwise_and' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''
np.bitwise_and(1, 2**63 + 100)
TypeError: ufunc 'bitwise_and' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''
np.bitwise_and(1, 2**64)
0
這是bug還是我失去了一些東西?
它的工作原理。你認爲這是一個錯誤還是有一個原因,在這裏需要手動轉換?請注意,2 ** 64沒有任何問題。 – jf328 2014-11-05 13:20:27
我更新了答案,我認爲這不是一個錯誤。 – HYRY 2014-11-05 13:47:46