Path: blob/master/Data Analysis using Python/Numpy Excercise.ipynb
3074 views
Kernel: Python 3
Write a NumPy program to test whether none of the elements of a given array is zero.
In [3]:
Out[3]:
Original array: [1 2 3 4]
Test if none of the elements of the said array is zero
: True
Original array: [0 1 2 3]
Test if none of the elements of the said array is zero:
False
Write a NumPy program to create an array of 5 zeros, 5 ones, 5 fives.
In [13]:
Out[13]:
array([0., 0., 0., 0., 0., 1., 1., 1., 1., 1., 5., 5., 5., 5., 5.])
Write a NumPy program to generate an array of 15 random numbers from a standard normal distribution
In [ ]:
Write a NumPy program to create a vector with values ranging from 10 to 40 and print all values except the first and last.
In [ ]:
Write a NumPy program to create a vector with values from 1 to 15 and change the sign of the numbers in the range from 10 to 15.
In [ ]:
Write a NumPy program to create a 3x4 matrix filled with values from 10 to 21
In [16]:
Out[16]:
[[10 11 12 13]
[14 15 16 17]
[18 19 20 21]]
Write a NumPy program to compute the inner product of two given vectors
In [ ]:
Write a NumPy program to create a structured array from given student name, height, class and their data types. Now sort the array on height.
In [ ]:
Write a NumPy program to add, subtract, multiply, divide arguments element-wise.
In [ ]:
Write a NumPy program to get the minimum and maximum value of a given array along the second axis.
In [ ]:
Write a NumPy program to display all the dates for the month of May, 2019
In [ ]:
Write a NumPy program to capitalize the first letter, lowercase, uppercase, swapcase, title-case of all the elements of a given array
In [ ]:
In [ ]: