IT界討論區(71) 寫CODE規則勿認真,IT三寶更稱心
唔係咁的 2019-11-6 21:02:01
:^(

Ads

想自殺窮三代IT狗 2019-11-6 21:03:13 貪玩,令到 back-end websocket 都可以 dispatch 到 redux action
:^(
毒撚研究所所長 2019-11-6 22:04:49 咁原因係
:^(
毒撚研究所所長 2019-11-6 22:32:47
:^(
唔係咁的 2019-11-6 22:32:55
:^(
想自殺窮三代IT狗 2019-11-6 22:35:56
:^(
毒撚研究所所長 2019-11-6 22:41:33
:^(
毒撚研究所所長 2019-11-6 22:51:56 巴打呢篇文應該好接近原因
:^(
:^(
但同時應該牽涉到numpy點顯示個近似值
:^(
唔係咁的 2019-11-6 23:05:00
:^(
想自殺窮三代IT狗 2019-11-6 23:06:40
:^(

Ads

嘴遁師青花 2019-11-6 23:15:28 係np.float 既 str method 同 np.array 既 str method behavior 唔同
2個 underlying 既 value 係 C既float 16所係 value compare with value is True
毒撚研究所所長 2019-11-6 23:17:54 如果係咁 咁有另一個問題 我呢度兩個數 點解淨係第二個受影響
嘴遁師青花 2019-11-6 23:18:47 https://docs.scipy.org/doc/numpy/user/basics.types.html

 Generally, problems are easily fixed by explicitly converting array scalars to Python scalars, using the corresponding Python type function (e.g., int, float, complex, str, unicode).


str(np.float(0.74)) 係conver convert 係 c float 做 python float 先
str(np.array([0.8,0.7])) 就唔會
嘴遁師青花 2019-11-6 23:19:43 str(np.float(0.74)) 係會 convert c float 做 python float 先
str(np.array([0.8,0.7])) 就唔會
:^(
唔係咁的 2019-11-6 23:25:17
:^(
嘴遁師青花 2019-11-6 23:25:38 因為係float16 既世界入面
>>> np.float16(8.1234567) == 8.125 True
第一個唔受影響只係好彩
想自殺窮三代IT狗 2019-11-6 23:36:31
:^(
印度F4 2019-11-6 23:37:54 請問有無巴打做過iadvantage?入面環境如何?
:^(
長崎失眠 2019-11-6 23:40:41
:^(
毒撚研究所所長 2019-11-7 00:37:41
:^(

Ads

唔係咁的 2019-11-7 00:49:52
:^(
唔係咁的 2019-11-7 00:50:47
:^(
嘴遁師青花 2019-11-7 07:38:22 第二個case, 係python float既 str method 幫你round左,float既value其實一樣
手一黏便緊(UTC+9 2019-11-7 07:56:43
:^(