Algorithms For Dummies


Performing Calculations Using



Download 7,18 Mb.
Pdf ko'rish
bet190/651
Sana15.07.2021
Hajmi7,18 Mb.
#120357
1   ...   186   187   188   189   190   191   192   193   ...   651
Bog'liq
Algorithms

Performing Calculations Using  

Vectors and Matrixes

To perform useful work with Python, you often need to work with larger amounts 

of data that comes in specific forms. These forms have odd-sounding names, but 

the names are quite important. The three terms you need to know for this chapter 

are as follows:

 

»

Scalar: A single base data item. For example, the number 2 shown by itself 

is a scalar.



 

»

Vector: A one-dimensional array (essentially a list) of data items. For example, 

an array containing the numbers 2, 3, 4, and 5 would be a vector. You access 

items in a vector using a zero-based index, a pointer to the item you want. The 

item at index 0 is the first item in the vector, which is 2 in this case.



 

»

Matrix: A two-or-more-dimensional array (essentially a table) of data items. 

For example, an array containing the numbers 2, 3, 4, and 5 in the first row 

and 6, 7, 8, and 9 in the second row is a matrix. You access items in a matrix 

using a zero-based row-and-column index. The item at row 0, column 0 is the 

first item in the matrix, which is 2 in this case.

Python provides an interesting assortment of features on its own, as described in 

Chapter 4, but you’d still need to do a lot of work to perform some tasks. To reduce 

the  amount  of  work  you  do,  you  can  rely  on  code  written  by  other  people  and 

found in packages. The following sections describe how to use the NumPy package 

to perform various tasks on scalars, vectors, and matrixes.




CHAPTER 5


Download 7,18 Mb.

Do'stlaringiz bilan baham:
1   ...   186   187   188   189   190   191   192   193   ...   651




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2025
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish