From b8e1807fa9311116b39efd98899b021d7f792099 Mon Sep 17 00:00:00 2001 From: Thinh Phan <79763166+thinh276@users.noreply.github.com> Date: Tue, 16 Nov 2021 17:47:02 +0900 Subject: [PATCH] Update ARGender.ipynb Use function "int" to fix TypeError: 'float' object cannot be interpreted as an integer --- assets/LogReg2/ARGender.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/LogReg2/ARGender.ipynb b/assets/LogReg2/ARGender.ipynb index f1167dc3..beec1fd0 100644 --- a/assets/LogReg2/ARGender.ipynb +++ b/assets/LogReg2/ARGender.ipynb @@ -78,7 +78,7 @@ " total_imgs = img_ids.shape[0]*view_ids.shape[0]*2 \n", " \n", " X_full = np.zeros((total_imgs, D))\n", - " y = np.hstack((np.zeros((total_imgs/2, )), np.ones((total_imgs/2, ))))\n", + " y = np.hstack((np.zeros((int(total_imgs/2), )), np.ones((int(total_imgs/2), ))))\n", " \n", " list_fn_m = build_list_fn('M-', img_ids, view_ids)\n", " list_fn_w = build_list_fn('W-', img_ids, view_ids)\n",