KEMBAR78
Numpy | PDF
0% found this document useful (0 votes)
8 views4 pages

Numpy

The document provides a guide on creating and manipulating arrays using NumPy in Python. It covers various operations such as creating arrays from files, reshaping, sorting, and combining arrays. Additionally, it includes methods for adding, removing, and splitting elements within arrays.

Uploaded by

nks844503nks
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
8 views4 pages

Numpy

The document provides a guide on creating and manipulating arrays using NumPy in Python. It covers various operations such as creating arrays from files, reshaping, sorting, and combining arrays. Additionally, it includes methods for adding, removing, and splitting elements within arrays.

Uploaded by

nks844503nks
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 4
Nomey. Tmpost? Ng Dolo beadTxt 3 mp. soad bat Ci ste. ext!) S_sreate am, emay from a text file } GENFROmTyT : Tip. genfromtxt (Pile-esv’, delimiter = > Create an nora from a. -csv file SAVETHT + mp. sawednt (‘pile txt’ 2 slelimiter =" |) tertle oe anney te a ctat Pile CREATING ARRays ARRAY = an = Mp rey (42,39) > Create a LD anna Or = mprarmras (Phe,3) (48 0}) = Create 0 20 array a ZEROS ¢ On = mp. zersc(s) AP oon of Ben 3 with value O ONEs = om = mp some: ((3,49) ~ 3X4 emoy woth elyNvobies 1 Eve +: am = mp» eye Cs) SKE are of 0 ond (identity mabrin) es @ scanned with OKEN Scanner a dare Poe paevetees Peace s tna. he ddsd ¢ at Tanta te Ba geet, Rete we eg beads (ee eye > ich can a ee ee © scanned with OKEN Scanner Size: amssize > Retuams me of | elamenh SHAPE 7 am. shape > Returns nows 8 Glurms of DTyPE + onr-diype r Rebus type of elamerts tm an Copying , Soxting and Reshaping Copy : mp. Copy (an) > Copies ons te mex memory View Drs vier (Atype) > create view of an element wlth Aype Abype SORT 2 Ona. Sort(D ~_Sost ony FLATTEN 3 tue-d_orr. flatten Ss > Flottens Rd annoy 4s 4a. Tromspose + on.T 0) : > Tromdposes ann, Resize : Om + 22a fee! (¢s,¢9) Ds thamges oy shape ds sxeo Meo voles sith 0. CINE ENDL EMIIY 44th Hie @ scanned with OKEN Scanner E> FT laeduane 5 0s Seahape (2,4) = Rishapa on de 3 rows , 4 Columns Without champing fofa 2 -. Adding and Removing elements. APPEND mp, Oppend (am, values) Append values be end ef arn INSERT + mps insert (om, 2, volues’) Init vols into an befere tinder 2. DELETE ; nips debate (arn, 3, axis = 0’) ee st Cormbining amd Sphitting- CONCATINATE : mp. cencatenate (art anne) antss 0) split + mp. hspait (om,s) 1 | 2 Adds 05.2 0 novos to Lu end of aad Tp Concotenate (Cams, are), ante = 4) > Adde ane e+ Columns to end of om L SPLIT + mp. spark (an,3) > Spite om tnt 3 sun > omen, > Spat an Kori: t feentally on te inden © APARPF ING wld deblelad dc blelnd Lill @ scanned with OKEN Scanner

You might also like