Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

numpy compute mad

# Median Absolute Deviation, MAD, is available in SciPy
from scipy.stats import median_abs_deviation

my_array = list(range(0, 10)) + [1000]
mad = median_abs_deviation(my_array)
print(mad) # prints 3.0
Comment

PREVIOUS NEXT
Code Example
Python :: mad python 
Python :: django rest framework simple jwt 
Python :: python for loop max iterations 
Python :: find rows in dataframe from another dataframe python 
Python :: csv reader python skip header 
Python :: how to get seconds from datetime in python 
Python :: discord get user slash command 
Python :: full screen jupyter notebook 
Python :: convert mb to gb python 
Python :: django import csrf exemplt 
Python :: pip install vlc 
Python :: ValueError: Shapes (None, 1) and (None, 11) are incompatible keras 
Python :: python count hex 
Python :: python read and delete line from file 
Python :: python webdriver open with chrome extension 
Python :: make new app folder in django templates dir 
Python :: python filter list of dictionaries by value 
Python :: all alphanumeric characters for python python 
Python :: list to excel python 
Python :: python get day month year 
Python :: python max value of list of tuples 
Python :: __gt__ 
Python :: np.array average row 
Python :: http.server python 
Python :: sum values in django models 
Python :: import pyplot python 
Python :: boto3 upload file to s3 
Python :: np.hstack 
Python :: how to create random tensor with tensorflow 
Python :: euclidean division in python 
ADD CONTENT
Topic
Content
Source link
Name
2+4 =