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 Python | Numpy matrix.mean() 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.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 matrix.std() With the help of matrix.std() method, we are able to find the standard deviation a matrix by using the same method. Syntax : matrix.std() Return : Return standard deviation of a matrix Example #1 : In this example we are able to find the standard deviation of a matrix by using matrix.std() method. P 1 min read Python | Numpy matrix.var() With the help of Numpy matrix.var() method, we can find the variance of a matrix by using the matrix.var() method. Syntax : matrix.var() Return : Return variance of a matrix Example #1 : In this example we can see that by using matrix.var() method we are able to find the variance of a given matrix. 1 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 Like