{"id":89243,"date":"2024-06-10T18:00:09","date_gmt":"2024-06-10T12:30:09","guid":{"rendered":"https:\/\/techvidvan.com\/tutorials\/?p=89243"},"modified":"2024-06-10T18:20:19","modified_gmt":"2024-06-10T12:50:19","slug":"mathematical-and-statistical-functions-on-numpy-arrays","status":"publish","type":"post","link":"https:\/\/techvidvan.com\/tutorials\/mathematical-and-statistical-functions-on-numpy-arrays\/","title":{"rendered":"Mathematical and Statistical Functions on NumPy Arrays"},"content":{"rendered":"<p>Various mathematical disciplines utilize operations or transformations to analyze patterns and solve problems involving mathematical objects or data. By inputting one or more statements, these operations result in a design based on a particular algorithm or rule. Mathematical functions play a crucial role in mathematics and are employed in numerous scientific and technical fields.<\/p>\n<p>Multidimensional arrays and matrices are given support by NumPy, a library for scientific and mathematical computing in Python. It also has arithmetic operations for efficient array processing and mathematical functions. These functions are provided by the NumPy library for Python. NumPy is an abbreviation for Numerical Python.<\/p>\n<p>NumPy math programs include functions for elementary numbers, trigonometry, logarithms, exponentials, arithmetic calculations, linear algebra, etc. These programs are designed to work easily with NumPy arrays to enable users to perform statistical operations on large data sets efficiently and with optimal performance.<\/p>\n<table>\n<tbody>\n<tr>\n<td><strong>Function<\/strong><\/td>\n<td><strong>Description<\/strong><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">numpy.abs(x)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Compute the absolute value of each element in the array x.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">numpy.sqrt(x)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Compute the square root of each element in the array x.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">numpy.square(x)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Compute the square of each element in the array x.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">numpy.exp(x)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Compute the exponential function (e^x) for each element in the array x.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">numpy.log(x)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Compute the natural logarithm (logarithm to base e) of each element in the array x.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">numpy.log10(x)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Compute the base-10 logarithm of each element in the array x.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">numpy.log2(x)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Compute the base-2 logarithm of each element in the array x.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">numpy.sin(x)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Compute the sine of each angle in the array x in radians.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">numpy.cos(x)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Compute the cosine of each angle in the array x in radians.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">numpy.tan(x)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Compute the tangent of each angle in the array x in radians.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">numpy.arcsin(x)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Compute the inverse sine of each element in the array x.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">numpy.arccos(x)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Compute the inverse cosine of each element in the array x.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">numpy.arctan(x)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Compute the inverse tangent of each element in the array x.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">numpy.sinh(x)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Compute the hyperbolic sine of each element in the array x.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">numpy.cosh(x)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Compute the hyperbolic cosine of each element in the array x.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">numpy.tanh(x)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Compute the hyperbolic tangent of each element in the array x.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">numpy.arcsinh(x)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Compute the inverse hyperbolic sine of each element in the array x.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">numpy.arccosh(x)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Compute the inverse hyperbolic cosine of each element in the array x.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">numpy.arctanh(x)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Compute the inverse hyperbolic tangent of each element in the array x.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">numpy.add(x1, x2)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Add the two arrays x1 and x2 element-wise.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">numpy.subtract(x1, x2)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Subtract the two arrays x1 and x2 element-wise.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">numpy.multiply(x1, x2)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Multiply the two arrays x1 and x2 element-wise.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">numpy.divide(x1, x2)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Divide the two arrays x1 and x2 element-wise.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">numpy.power(x1, x2)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Raise each element in the array x1 to the power of the corresponding element in the array x2.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">numpy.maximum(x1, x2)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Return the element-wise maximum of the two arrays x1 and x2.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">numpy.minimum(x1, x2)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Return the element-wise minimum of the two arrays x1 and x2.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">numpy.floor(x)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Compute the floor value of each element in the array x. The floor value is the largest integer less than or equal to the given value.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">numpy.ceil(x)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Compute the ceiling value of each element in the array x. The ceiling value is the smallest integer greater than or equal to the given value.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">numpy.round(x)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Round each element in the array x to the nearest integer.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">numpy.isnan(x)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Check if each element in the array x is NaN (Not a Number).<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">numpy.isinf(x)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Check if each element in the array x is infinity.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">numpy.isfinite(x)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Check if each element in the array x is finite (not NaN or infinity).<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>Example:<\/h3>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">import numpy as np\r\n\r\n# Sample NumPy array for demonstration\r\narr = np.array([1, 2, -3, 4, 5])\r\n\r\n# Absolute value\r\nabs_result = np.abs(arr)\r\nprint(\"Absolute Value:\", abs_result)\r\n\r\n# Square root\r\nsqrt_result = np.sqrt(arr)\r\nprint(\"Square Root:\", sqrt_result)\r\n\r\n# Square\r\nsquare_result = np.square(arr)\r\nprint(\"Square:\", square_result)\r\n\r\n# Exponential\r\nexp_result = np.exp(arr)\r\nprint(\"Exponential:\", exp_result)\r\n\r\n# Natural logarithm\r\nlog_result = np.log(arr)\r\nprint(\"Natural Logarithm:\", log_result)\r\n\r\n# Base-10 logarithm\r\nlog10_result = np.log10(arr)\r\nprint(\"Base-10 Logarithm:\", log10_result)\r\n\r\n# Base-2 logarithm\r\nlog2_result = np.log2(arr)\r\nprint(\"Base-2 Logarithm:\", log2_result)\r\n\r\n# Sine\r\nsin_result = np.sin(arr)\r\nprint(\"Sine:\", sin_result)\r\n\r\n# Cosine\r\ncos_result = np.cos(arr)\r\nprint(\"Cosine:\", cos_result)\r\n\r\n# Tangent\r\ntan_result = np.tan(arr)\r\nprint(\"Tangent:\", tan_result)\r\n\r\n# Inverse sine\r\narcsin_result = np.arcsin(arr\/10)\r\nprint(\"Inverse Sine:\", arcsin_result)\r\n\r\n# Inverse cosine\r\narccos_result = np.arccos(arr\/10)\r\nprint(\"Inverse Cosine:\", arccos_result)\r\n\r\n# Inverse tangent\r\narctan_result = np.arctan(arr\/10)\r\nprint(\"Inverse Tangent:\", arctan_result)\r\n\r\n# Hyperbolic sine\r\nsinh_result = np.sinh(arr)\r\nprint(\"Hyperbolic Sine:\", sinh_result)\r\n\r\n# Hyperbolic cosine\r\ncosh_result = np.cosh(arr)\r\nprint(\"Hyperbolic Cosine:\", cosh_result)\r\n\r\n# Hyperbolic tangent\r\ntanh_result = np.tanh(arr)\r\nprint(\"Hyperbolic Tangent:\", tanh_result)\r\n\r\n# Inverse hyperbolic sine\r\narcsinh_result = np.arcsinh(arr\/10)\r\nprint(\"Inverse Hyperbolic Sine:\", arcsinh_result)\r\n\r\n# Inverse hyperbolic cosine\r\narccosh_result = np.arccosh(arr\/10)\r\nprint(\"Inverse Hyperbolic Cosine:\", arccosh_result)\r\n\r\n# Inverse hyperbolic tangent\r\narctanh_result = np.arctanh(arr\/10)\r\nprint(\"Inverse Hyperbolic Tangent:\", arctanh_result)\r\n\r\n# Addition\r\nx1 = np.array([1, 2, 3])\r\nx2 = np.array([4, 5, 6])\r\nadd_result = np.add(x1, x2)\r\nprint(\"Addition:\", add_result)\r\n\r\n# Subtraction\r\nsubtract_result = np.subtract(x1, x2)\r\nprint(\"Subtraction:\", subtract_result)\r\n\r\n# Multiplication\r\nmultiply_result = np.multiply(x1, x2)\r\nprint(\"Multiplication:\", multiply_result)\r\n\r\n# Division\r\ndivide_result = np.divide(x1, x2)\r\nprint(\"Division:\", divide_result)\r\n\r\n# Power\r\npower_result = np.power(x1, 2)\r\nprint(\"Power:\", power_result)\r\n\r\n# Maximum\r\nmax_result = np.maximum(arr, [2, 3, 4, 1, 6])\r\nprint(\"Maximum:\", max_result)\r\n\r\n# Minimum\r\nmin_result = np.minimum(arr, [2, 3, 4, 1, 6])\r\nprint(\"Minimum:\", min_result)\r\n\r\n# Floor\r\nfloor_result = np.floor(arr\/2.5)\r\nprint(\"Floor:\", floor_result)\r\n\r\n# Ceiling\r\nceil_result = np.ceil(arr\/2.5)\r\nprint(\"Ceiling:\", ceil_result)\r\n\r\n# Round\r\nround_result = np.round(arr\/2.5)\r\nprint(\"Round:\", round_result)\r\n\r\n# Check for NaN (Not a Number)\r\narr_with_nan = np.array([1.0, np.nan, 3.0, np.nan, 5.0])\r\nisnan_result = np.isnan(arr_with_nan)\r\nprint(\"Check for NaN:\", isnan_result)\r\n\r\n# Check for Infinity\r\narr_with_inf = np.array([1.0, np.inf, 3.0, -np.inf, 5.0])\r\nisinf_result = np.isinf(arr_with_inf)\r\nprint(\"Check for Infinity:\", isinf_result)\r\n\r\n# Check for Finite (not NaN or Infinity)\r\nisfinite_result = np.isfinite(arr_with_inf)\r\nprint(\"Check for Finite:\", isfinite_result)<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p>Absolute Value: [1 2 3 4 5]<br \/>\nSquare Root: [1. 1.41421356 nan 2. 2.23606798]<br \/>\nSquare: [ 1 4 9 16 25]<br \/>\nExponential: [ 2.71828183 7.3890561 0.04978707 54.59815003 148.4131591 ]<br \/>\nNatural Logarithm: [0. 0.69314718 nan 1.38629436 1.60943791]<br \/>\nBase-10 Logarithm: [0. 0.30103 nan 0.60205999 0.69897 ]<br \/>\nBase-2 Logarithm: [0. nan nan 2. 2.32192809]<br \/>\nSine: [ 0.90929743 0.90929743 -0.14112001 -0.7568025 -0.95892427]<br \/>\nCosine: [ 0.41614684 -0.41614684 -0.9899925 -0.65364362 0.28366219]<br \/>\nTangent: [ 2.18503986 -2.18503986 0.14254654 1.15782128 -3.38051501]<br \/>\nInverse Sine: [ 0.10016742 0.10016742 -0.14159265 -0.14159265 -0.14159265]<br \/>\nInverse Cosine: [1.47062891 1.47062891 1.71229429 1.71229429 1.71229429]<br \/>\nInverse Tangent: [0.09966865 0.09966865 0.09966936 0.09966936 0.09966936]<br \/>\nHyperbolic Sine: [ 1.17520119 3.62686041 -10.01787493 27.2899172 74.20321058]<br \/>\nHyperbolic Cosine: [ 1.54308063 3.76219569 10.06766199 27.30823284 74.20994852]<br \/>\nHyperbolic Tangent: [0.76159416 0.91715234 0.9993293 0.99996373 0.99998771]<br \/>\nInverse Hyperbolic Sine: [ 0.10000333 0.34657359 -0. 1.13532711 2.31243834]<br \/>\nInverse Hyperbolic Cosine: [1.47221949 1.46312035 nan 1.51102431 1.51742713]<br \/>\nInverse Hyperbolic Tangent: [0.09966841 0.31968226 nan 1.02486954 2.05223585]<br \/>\nAddition: [5 7 9]<br \/>\nSubtraction: [-3 -3 -3]<br \/>\nMultiplication: [ 4 10 18]<br \/>\nDivision: [0.25 0.4 0.5 ]<br \/>\nPower: [1 4 9]<br \/>\nMaximum: [2 3 4 4 6]<br \/>\nMinimum: [ 1 2 -3 1 5]<br \/>\nFloor: [ 0. 0. -2. 1. 2.]<br \/>\nCeiling: [ 1. 1. -1. 2. 2.]<br \/>\nRound: [ 0. 1. -1. 2. 2.]<br \/>\nCheck for NaN: [False True False True False]<br \/>\nCheck for Infinity: [False True False True False]<br \/>\nCheck for Finite: [ True False True False True]<\/p>\n<h3>A Few Statistical Functions on NumPy<\/h3>\n<p>Quantifying data characteristics, identifying patterns, making predictions, and testing hypotheses are all tasks that are made possible through the use of statistical functions. These functions are methods utilized to analyze, summarize, and derive insights from data in various scientific and technical fields. Statistical applications play a central role in areas such as data analysis and statistics by allowing for an in-depth analysis of data sets.<\/p>\n<p>In NumPy, one can access arithmetic functions specifically designed for calculating mathematical operations on data that is contained within NumPy arrays. These functions involve diverse calculations, such as the means, medians, standard deviations, variances, percentages, covariances, and other similar numerical measures. Because of its strong optimization and capacity for managing large sets of data with ease, NumPy statistical programming proves to be an essential resource for studies involving data analysis, scientific inquiries, and machine learning.<\/p>\n<table>\n<tbody>\n<tr>\n<td><strong>Function<\/strong><\/td>\n<td><strong>Description<\/strong><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">numpy.mean(x, axis=None)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Compute the mean (average) of array elements along the specified axis.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">numpy.median(x, axis=None)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Compute the median (middle value) of array elements along the specified axis.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">numpy.var(x, axis=None)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Compute the variance of array elements along the specified axis.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">numpy.std(x, axis=None)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Compute the standard deviation of array elements along the specified axis.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">numpy.min(x, axis=None)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Find the minimum value in the array along the specified axis.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">numpy.max(x, axis=None)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Find the maximum value in the array along the specified axis.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">numpy.percentile(x, q, axis=None)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Compute the percentile of the data along thegiven axis.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">numpy.histogram(a, bins=10, range=None)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Compute the histogram of a dataset. Returns histogram values and bin edges.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">numpy.corrcoef(x, y=None, rowvar=True)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Compute the correlation coefficient between two or more arrays.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">numpy.cov(m, y=None, rowvar=True, bias=False)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Estimate a covariance matrix between two or more arrays.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">numpy.histogram2d(x, y, bins=10, range=None)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Compute a 2D histogram of two datasets. Returns histogram values and bin edges.<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>Conclusion:<\/h3>\n<p>Within the Python programming environment, NumPy&#8217;s mathematical and statistical functions allow for the efficient execution of complex mathematical and statistical operations. These functions are important tools, proving useful in a wide range of tasks including data analysis, scientific investigations, and other mathematical endeavors.<\/p>\n<p>By enhancing Python&#8217;s numerical computation capabilities, NumPy makes the language an impressive platform for tackling intricate numerical challenges. To put it simply, NumPy&#8217;s functions are indispensable for maximizing Python&#8217;s potential. Happy Coding with this guide!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Various mathematical disciplines utilize operations or transformations to analyze patterns and solve problems involving mathematical objects or data. By inputting one or more statements, these operations result in a design based on a particular&#46;&#46;&#46;<\/p>\n","protected":false},"author":6,"featured_media":447384,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[385],"tags":[383,5580,5579,5651,5247,5649,5650,384,5581],"class_list":["post-89243","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-numpy-tutorials","tag-learn-numpy","tag-mathematical-statistical-functions","tag-mathematical-statistical-functions-in-numpy","tag-mathematical-and-statistical-functions-on-numpy-arrays","tag-numpy","tag-numpy-mathematical-and-statistical-functions","tag-numpy-mathematical-and-statistical-functions-on-arrays","tag-numpy-tutorial","tag-numpy-tutorial-for-beginners"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Mathematical and Statistical Functions on NumPy Arrays - TechVidvan<\/title>\n<meta name=\"description\" content=\"NumPy&#039;s mathematical and statistical functions allow for the efficient execution of complex mathematical and statistical operations.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/techvidvan.com\/tutorials\/mathematical-and-statistical-functions-on-numpy-arrays\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Mathematical and Statistical Functions on NumPy Arrays - TechVidvan\" \/>\n<meta property=\"og:description\" content=\"NumPy&#039;s mathematical and statistical functions allow for the efficient execution of complex mathematical and statistical operations.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/techvidvan.com\/tutorials\/mathematical-and-statistical-functions-on-numpy-arrays\/\" \/>\n<meta property=\"og:site_name\" content=\"TechVidvan\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/TechVidvan\/\" \/>\n<meta property=\"article:published_time\" content=\"2024-06-10T12:30:09+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-06-10T12:50:19+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2024\/11\/mathematical-statistical-functions-in-numpy.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"author\" content=\"TechVidvan Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@vidvantech\" \/>\n<meta name=\"twitter:site\" content=\"@vidvantech\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"TechVidvan Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Mathematical and Statistical Functions on NumPy Arrays - TechVidvan","description":"NumPy's mathematical and statistical functions allow for the efficient execution of complex mathematical and statistical operations.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/techvidvan.com\/tutorials\/mathematical-and-statistical-functions-on-numpy-arrays\/","og_locale":"en_US","og_type":"article","og_title":"Mathematical and Statistical Functions on NumPy Arrays - TechVidvan","og_description":"NumPy's mathematical and statistical functions allow for the efficient execution of complex mathematical and statistical operations.","og_url":"https:\/\/techvidvan.com\/tutorials\/mathematical-and-statistical-functions-on-numpy-arrays\/","og_site_name":"TechVidvan","article_publisher":"https:\/\/www.facebook.com\/TechVidvan\/","article_published_time":"2024-06-10T12:30:09+00:00","article_modified_time":"2024-06-10T12:50:19+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2024\/11\/mathematical-statistical-functions-in-numpy.webp","type":"image\/webp"}],"author":"TechVidvan Team","twitter_card":"summary_large_image","twitter_creator":"@vidvantech","twitter_site":"@vidvantech","twitter_misc":{"Written by":"TechVidvan Team","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/techvidvan.com\/tutorials\/mathematical-and-statistical-functions-on-numpy-arrays\/#article","isPartOf":{"@id":"https:\/\/techvidvan.com\/tutorials\/mathematical-and-statistical-functions-on-numpy-arrays\/"},"author":{"name":"TechVidvan Team","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/person\/dde481bb412350cde1ed6e389bc0deaf"},"headline":"Mathematical and Statistical Functions on NumPy Arrays","datePublished":"2024-06-10T12:30:09+00:00","dateModified":"2024-06-10T12:50:19+00:00","mainEntityOfPage":{"@id":"https:\/\/techvidvan.com\/tutorials\/mathematical-and-statistical-functions-on-numpy-arrays\/"},"wordCount":1161,"commentCount":0,"publisher":{"@id":"https:\/\/techvidvan.com\/tutorials\/#organization"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/mathematical-and-statistical-functions-on-numpy-arrays\/#primaryimage"},"thumbnailUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2024\/11\/mathematical-statistical-functions-in-numpy.webp","keywords":["learn numpy","mathematical &amp; statistical functions","mathematical &amp; statistical functions in numpy","mathematical and statistical functions on numpy arrays","numpy","numpy mathematical and statistical functions","numpy mathematical and statistical functions on arrays","numPy tutorial","numpy tutorial for beginners"],"articleSection":["NumPy Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/techvidvan.com\/tutorials\/mathematical-and-statistical-functions-on-numpy-arrays\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/techvidvan.com\/tutorials\/mathematical-and-statistical-functions-on-numpy-arrays\/","url":"https:\/\/techvidvan.com\/tutorials\/mathematical-and-statistical-functions-on-numpy-arrays\/","name":"Mathematical and Statistical Functions on NumPy Arrays - TechVidvan","isPartOf":{"@id":"https:\/\/techvidvan.com\/tutorials\/#website"},"primaryImageOfPage":{"@id":"https:\/\/techvidvan.com\/tutorials\/mathematical-and-statistical-functions-on-numpy-arrays\/#primaryimage"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/mathematical-and-statistical-functions-on-numpy-arrays\/#primaryimage"},"thumbnailUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2024\/11\/mathematical-statistical-functions-in-numpy.webp","datePublished":"2024-06-10T12:30:09+00:00","dateModified":"2024-06-10T12:50:19+00:00","description":"NumPy's mathematical and statistical functions allow for the efficient execution of complex mathematical and statistical operations.","breadcrumb":{"@id":"https:\/\/techvidvan.com\/tutorials\/mathematical-and-statistical-functions-on-numpy-arrays\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/techvidvan.com\/tutorials\/mathematical-and-statistical-functions-on-numpy-arrays\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/techvidvan.com\/tutorials\/mathematical-and-statistical-functions-on-numpy-arrays\/#primaryimage","url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2024\/11\/mathematical-statistical-functions-in-numpy.webp","contentUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2024\/11\/mathematical-statistical-functions-in-numpy.webp","width":1200,"height":628,"caption":"mathematical &amp;-statistical functions-in numpy"},{"@type":"BreadcrumbList","@id":"https:\/\/techvidvan.com\/tutorials\/mathematical-and-statistical-functions-on-numpy-arrays\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/techvidvan.com\/tutorials\/"},{"@type":"ListItem","position":2,"name":"Mathematical and Statistical Functions on NumPy Arrays"}]},{"@type":"WebSite","@id":"https:\/\/techvidvan.com\/tutorials\/#website","url":"https:\/\/techvidvan.com\/tutorials\/","name":"TechVidvan Blogs","description":"","publisher":{"@id":"https:\/\/techvidvan.com\/tutorials\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/techvidvan.com\/tutorials\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/techvidvan.com\/tutorials\/#organization","name":"TechVidvan","url":"https:\/\/techvidvan.com\/tutorials\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/logo\/image\/","url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2024\/03\/techvidvan-logo-200x50-1.webp","contentUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2024\/03\/techvidvan-logo-200x50-1.webp","width":200,"height":50,"caption":"TechVidvan"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/TechVidvan\/","https:\/\/x.com\/vidvantech"]},{"@type":"Person","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/person\/dde481bb412350cde1ed6e389bc0deaf","name":"TechVidvan Team"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts\/89243","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/comments?post=89243"}],"version-history":[{"count":4,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts\/89243\/revisions"}],"predecessor-version":[{"id":447510,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts\/89243\/revisions\/447510"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/media\/447384"}],"wp:attachment":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/media?parent=89243"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/categories?post=89243"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/tags?post=89243"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}