1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | # # µû¶óÇÏ¸ç ¹è¿ì´Â ÆÄÀ̽ã°ú µ¥ÀÌÅÍ°úÇÐ(»ý´ÉÃâÆÇ»ç 2020) # LAB 10-4 ³ÑÆÄÀÌ ¹è¿ÀÇ ÇüÅ ¾Ë¾Æ³»°í ½½¶óÀ̽ÌÇÏ¿© ¿¬»êÇϱâ, 264ÂÊ # import numpy as np x = np.array([[ 1.83, 1.76, 1.69, 1.86, 1.77, 1.73 ], [ 86.0, 74.0, 59.0, 95.0, 80.0, 68.0 ]]) y = x[0:2, 1:3] # ³ÑÆÄÀÌ ¹æ½ÄÀÇ ½½¶óÀÌ½Ì # ¾Æ·¡ÀÇ °á°ú´Â 1Â÷¿ø Çà·ÄÀ̸ç, x[0:2][1:2], x[0:2][1]°ú µ¿ÀÏÇÑ °á°ú z = x[0:2][1:3] # ½½¶óÀÌ½Ì print('x = ', x) print('y = ', y) print('z = ', z) print('x shape :', x.shape) print('y shape :', y.shape) print('z shape :', z.shape) print('z values = :', z) bmi = x[1] / x[0]**2 print('BMI data') print(bmi) | cs |