Python | Numpy matrix.mean() Last Updated : 15 Apr, 2019 Comments Improve Suggest changes Like Article Like Report With the help of Numpy matrix.mean() method, we can get the mean value from given matrix. Syntax : matrix.mean() Return : Return mean value from given matrix Example #1 : In this example we can see that we are able to get the mean value from a given matrix with the help of method matrix.mean(). Python3 1=1 # import the important module in python import numpy as np # make matrix with numpy gfg = np.matrix('[64, 1; 12, 3]') # applying matrix.mean() method geeks = gfg.mean() print(geeks) Output: 20.0 Example #2 : Python3 1=1 # import the important module in python import numpy as np # make a matrix with numpy gfg = np.matrix('[1, 2, 3; 4, 5, 6; 7, 8, 9]') # applying matrix.mean() method geeks = gfg.mean() print(geeks) Output: 5.0 Comment More infoAdvertise with us Next Article numpy.mean() in Python J jitender_1998 Follow Improve Article Tags : Python Python-numpy Python numpy-Matrix Function Practice Tags : python Similar Reads numpy.mean() in Python numpy.mean(arr, axis = None) : Compute the arithmetic mean (average) of the given data (array elements) along the specified axis. Parameters : arr : [array_like]input array. axis : [int or tuples of int]axis along which we want to calculate the arithmetic mean. Otherwise, it will consider arr to be 2 min read numpy.mean() in Python numpy.mean(arr, axis = None) : Compute the arithmetic mean (average) of the given data (array elements) along the specified axis. Parameters : arr : [array_like]input array. axis : [int or tuples of int]axis along which we want to calculate the arithmetic mean. Otherwise, it will consider arr to be 2 min read numpy.median() in Python numpy.median(arr, axis = None) : Compute the median of the given data (array elements) along the specified axis. How to calculate median? Given data points. Arrange them in ascending order Median = middle term if total no. of terms are odd. Median = Average of the terms in the middle (if total no. o 2 min read numpy.median() in Python numpy.median(arr, axis = None) : Compute the median of the given data (array elements) along the specified axis. How to calculate median? Given data points. Arrange them in ascending order Median = middle term if total no. of terms are odd. Median = Average of the terms in the middle (if total no. o 2 min read Python | numpy.nanmean() function numpy.nanmean() function can be used to calculate the mean of array ignoring the NaN value. If array have NaN value and we can find out the mean without effect of NaN value. Syntax: numpy.nanmean(a, axis=None, dtype=None, out=None, keepdims=))Parameters: a: [arr_like] input array axis: we can use ax 2 min read numpy.nanvar() in Python numpy.nanvar(arr, axis = None) : Compute the variance of the given data (array elements) along the specified axis(if any), while ignoring NaN values. Example : x = 1 1 1 1 1 Standard Deviation = 0 . Variance = 0 y = 9, 2, 5, 4, 12, 7, 8, 11, 9, 3, 7, 4, 12, 5, 4, 10, 9, 6, 9, 4 Step 1 : Mean of dist 3 min read Like