Menu
Newbedev LogoNEWBEDEV Python Javascript Linux Cheat sheet
Newbedev LogoNEWBEDEV
  • Python 1
  • Javascript
  • Linux
  • Cheat sheet
  • Contact

mean numpy of a list code example

Example 1: mean of a vector in python

>>> import numpy
>>> numbers = [3, 2, 8, 7]
>>> mean = numpy.mean(numbers)
>>> mean
5.0

Example 2: numpy average

import numpy as np 
a = np.arange(6).reshape(3,2) 
average = np.average(a)

Tags:

Python Example

Related

linux grep multiple strings and code example unity how to refresh scene code example Php shorthand if multiple conditions code example how to alter table and add FK in sql query code example php get url after question mark code example how to read a csv file in c code example how to create object list in c# code example css disable scroll bar in page code example node list folder contents code example how to create a new docker-compose.yml file code example how to mock functions in jes code example loop through all values in dictionary python code example

Recent Posts

Pandas how to find column contains a certain value Recommended way to install multiple Python versions on Ubuntu 20.04 Build super fast web scraper with Python x100 than BeautifulSoup How to convert a SQL query result to a Pandas DataFrame in Python How to write a Pandas DataFrame to a .csv file in Python
© 2021 newbedevPrivacy Policy