龍家俊教你 機器學習 day45 #ndarray運算 # 生成10名同學,5門課程的數據 >>> score = np.random.randint(30, 100, (10, 5)) # 取出最後4名同學的成績,用於邏輯判斷 >>> test_score = score[6:, 0:5] # 邏輯判斷, 如果成績大於60就標記為True 否則為False >>> test_score > 60 array([[ True, True, True, False, True], [ True, True, True, False, True], [ True, True, False, False, True], [False, True, True, True, True]])
Log in to join in Reading is open to everyone. Replying needs an account.
No comments yet