Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

np.array average row

>>> a = np.array([[1, 2], [3, 4]])
>>> np.mean(a)
2.5
>>> np.mean(a, axis=0)
array([2., 3.])
>>> np.mean(a, axis=1)
array([1.5, 3.5])
Comment

PREVIOUS NEXT
Code Example
Python :: unlimited keyword arguments python 
Python :: list of files to zip python 
Python :: drop duplicate rows pandas except nan 
Python :: python defaultdict 
Python :: static class python 
Python :: http.server python 
Python :: initialize an array in python 
Python :: encrypt string python 
Python :: sum values in django models 
Python :: generate gif py 
Python :: pd dataframe get column names 
Python :: python data frame check if any nan value present 
Python :: shutil move overwrite 
Python :: print value of tensor 
Python :: how to keep a webdriver tab open 
Python :: maping value to data in pandas dataframe 
Python :: how to create random tensor with tensorflow 
Python :: make sure text is on page selenium python 
Python :: install sklearn-features 
Python :: len of int python 
Python :: python find index of minimum in list 
Python :: change selected option optionmenu tkinter 
Python :: string startswith python 
Python :: remove outliers python dataframe 
Python :: python print combinations of string 
Python :: pdf to text python 
Python :: how to save a neural network pytorch 
Python :: spacy ner 
Python :: Concatenate strings from several rows using Pandas groupby 
Python :: python3 change file permissions 
ADD CONTENT
Topic
Content
Source link
Name
8+9 =