我正在嘗試使用以下代碼將數組 str 32 轉換為數組 int 32 但引發錯誤: int() with base 10: '' 的文字無效:請注意,我需要在 b 的值之間有一個空格作為輸入import numpy as npa =np.array( (input('8')))b =np.array((input('8 '' 6 '' 14 '' 7 '' 3 '' 2 '' 11 '' 10')))c = b.astype(np.int)
添加回答
舉報
0/150
提交
取消