For any queries you can reach us at infovistarindia@gmail.com / WhatsApp us: +919158876092

NumPy Basic Operations

NumPy Basic Operations

a = np.array( [ 6, 12, 18, 24, 30] )  
b = np.array( [ 1, 2, 3, 4 ] )

1. The below code will return the difference between the two arrays.

z = x - y

2. The below code will return the arrays holding the square of each item.

y**2

3. The below code will return the value based on the given expression.

4. The below code will return "true" at every item position which satisfies the given condition.

x<15