import numpy as np
battle_deaths = [[344, 2345], [253, 4345]]
deaths = np.array(battle_deaths)
deaths
array([[5341, 2345], [ 253, 4345]])
deaths[0, 1]
2345
deaths[:, 1]
array([2345, 4345])
deaths[1, :]
array([ 253, 4345])
civilian_deaths = np.array([4352, 233, 3245, 256, 2394])
civilian_deaths
array([4352, 233, 3245, 256, 2394])
few_civ_deaths = np.where(civilian_deaths < 500)
few_civ_deaths
(array([1, 3]),)
civ_deaths = civilian_deaths[few_civ_deaths]
civ_deaths
array([233, 256])