How to do numerical operations in Python using Numpy?

How to do numerical operations in Python using Numpy?

This recipe helps you do numerical operations in Python using Numpy
In [1]:
## How to do numerical operations in Python using Numpy
def Kickstarter_Example_51():
    print()
    print(format('How to do numerical operations in Python using Numpy','*^82'))
    import warnings
    warnings.filterwarnings("ignore")

    # Load Libraries
    import numpy as np
    # Create an array
    sales = np.array([4352, 233, 3245, 256, 2394])
    print(); print(sales)

    # Mean value of the array
    print(); print(sales.mean())

    # Total amount of deaths
    print(); print(sales.sum())

    # Smallest value in the array
    print(); print(sales.min())

    # Largest value in the array
    print(); print(sales.max())

Kickstarter_Example_51()
***************How to do numerical operations in Python using Numpy***************

[4352  233 3245  256 2394]

2096.0

10480

233

4352


Stuck at work?
Can't find the recipe you are looking for. Let us know and we will find an expert to create the recipe for you. Click here
Companies using this Recipe
1 developer from KPMG
1 developer from Vodafone
1 developer from Altimetrik
1 developer from LTI
1 developer from YASH Technologies
1 developer from ANAC
1 developer from MudraCircle
1 developer from HvH
1 developer from Renovite Technologies