numpy kirish
Page preview (5 pages)
Scroll down 👇
About "numpy kirish"
import numpy as np # i. 1d massivlarda indexlash va kesib olish 1d -one dimensional - 1 o'lchamli array1 = np.arange(10, 100, 10) array1 # -index -9 -8 -7 -6 -5 -4 -3 -2 -1 # array([10, 20, 30, 40, 50, 60, 70, 80, 90]) # index 0 1 2 3 4 5 6 7 8 array([10, 20, 30, 40, 50, 60, 70, 80, 90]) array1[0] 10 # arraylardan kerakli ma'lumotni kesib olish - slice # array_name[start_index:stop_index:step] array1[2:7:2] # range(start, stop, step) ga o'xshab,[start: stop: step] # startdan (stop-1) gacha step qadam bilan kesib oladi array([30, 50, 70]) array1[2:7] # step qadamini bermasak avtomotik step=1 deb oladi -> # array1[2:7] == array1[2:7:1] ikkalovi teng array([ 30, 200, 50, 60, 70]) …
This file contains 7 pages in PDF format (42.9 KB). To download "numpy kirish", click the Telegram button on the left.