1) What is a NumPy array? a) A collection of different data types b) A data structure that stores elements of the same data type in continuous memory c) A Python list with mixed values d) A dictionary-like structure 2) Which attribute returns the shape of a NumPy array? a) size b) dtype c) shape d) ndim 3) For the array arr = np.array([[10,20,30],[40,50,60]]), what is arr.size? a) 2 b) 3 c) 6 d) 12 4) Which attribute gives the total memory consumed by an array in bytes? a) arr.size b) arr.shape c) arr.dtype d) arr.nbytes 5) What is the output of arr[0,1] for arr = [[10,20,30],[40,50,60]]? a) 10 b) 20 c) 30 d) 40 6) Which operation is used to extract a part of an array? a) Indexing b) Aggregation c) Slicing d) Reshaping 7) What is the output of arr[:,1]? a) First row b) First column c) Second column d) Second row 8) Which method changes the shape of an array without changing its data? a) resize() b) reshape() c) split() d) concatenate() 9) What will a.reshape(2,3) do? a) Converts array into 3D b) Converts array into 2 rows and 3 columns c) Deletes elements d) Changes data type 10) Which function joins two arrays into one? a) split() b) join() c) concatenate() d) stack()
0%
NumPy Array Basics & Attributes
共用
共用
共用
由
Asvadhana2007
編輯內容
列印
嵌入
更多
作業
排行榜
顯示更多
顯示更少
此排行榜當前是私有的。單擊
共用
使其公開。
資源擁有者已禁用此排行榜。
此排行榜被禁用,因為您的選項與資源擁有者不同。
還原選項
隨機輪盤
是一個開放式範本。它不會為排行榜生成分數。
需要登錄
視覺風格
字體
需要訂閱
選項
切換範本
顯示所有
播放活動時將顯示更多格式。
打開結果
複製連結
QR 代碼
刪除
恢復自動保存:
?