Numpyarrar
Numpyarrar
Creating
1D array
Creating
2D array
To convert
1D to 2D
and 2D to
1D
To convert
row vector
to column
vector
To find the
dimension
s of array
To print
the
diagonal
elements
To create
diagonal
matrix
Unit
Matrix
All
enteries
ones
All
enteries
zeros
Generate
random
no’s
Creating
Array with
random
no’s
Indexing
Slicing
A slicing operation creates a view on the original array, which is just a way of accessing array data. Thus the original array is not copied in memory.
To create a copy use copy() function
View
Copy
Scaler
operation
Operation
s b/w two
arrays
Relational
Logical
Operations
Statistical
Operation
2D
Sorting
axis=0 means column wise , similarly axis =1 means row wise
1D
Broadcasting
It’s also possible to do operations on arrays of different sizes. NumPy transform these arrays so that they all have the same size: this
conversion is called broadcasting.