{"id":28159,"date":"2023-10-16T16:26:11","date_gmt":"2023-10-16T10:56:11","guid":{"rendered":"http:\/\/www.pythonpool.com\/?p=28159"},"modified":"2023-10-16T16:26:21","modified_gmt":"2023-10-16T10:56:21","slug":"numpy-amin","status":"publish","type":"post","link":"https:\/\/www.pythonpool.com\/numpy-amin\/","title":{"rendered":"Power of Numpy.amin: A Step-by-Step Guide"},"content":{"rendered":"\n<p>In case you wish to find the minimum value from a set of values in an array, you are at the right place. Undoubtedly, numpy.amin is the best numpy function to achieve the required task. Read this article to learn more about this function!<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_74 counter-hierarchy ez-toc-counter ez-toc-transparent ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #990303;color:#990303\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #990303;color:#990303\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 eztoc-toggle-hide-by-default' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.pythonpool.com\/numpy-amin\/#About_numpyamin\" >About numpy.amin<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.pythonpool.com\/numpy-amin\/#Syntax_of_numpyamin\" >Syntax of numpy.amin()<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.pythonpool.com\/numpy-amin\/#Working\" >Working<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.pythonpool.com\/numpy-amin\/#Illustration_of_keepdims_parameter\" >Illustration of keepdims parameter<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.pythonpool.com\/numpy-amin\/#Return_type\" >Return type<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.pythonpool.com\/numpy-amin\/#The_preferred_dtypes\" >The preferred dtypes<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.pythonpool.com\/numpy-amin\/#The_Performance_Boost\" >The Performance Boost<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.pythonpool.com\/numpy-amin\/#amin_for_minimum_signal\" >amin for minimum signal<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/www.pythonpool.com\/numpy-amin\/#amin_for_signals_with_noise\" >amin for signals with noise<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/www.pythonpool.com\/numpy-amin\/#numpy_amin_for_multidimensional_array\" >numpy amin for multidimensional array<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/www.pythonpool.com\/numpy-amin\/#numpy_amin_vs_min\" >numpy amin vs. min<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/www.pythonpool.com\/numpy-amin\/#numpy_amin_alternatives\" >numpy amin alternatives<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/www.pythonpool.com\/numpy-amin\/#FAQs_on_numpyamin\" >FAQs on numpy.amin<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/www.pythonpool.com\/numpy-amin\/#Conclusion\" >Conclusion<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/www.pythonpool.com\/numpy-amin\/#Trending_Python_Articles\" >Trending Python Articles<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\" id=\"h-about-numpy-amin\"><span class=\"ez-toc-section\" id=\"About_numpyamin\"><\/span>About numpy.amin<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"600\" height=\"338\" src=\"http:\/\/www.pythonpool.com\/wp-content\/uploads\/2023\/10\/pexels-photo-9951077.jpeg\" alt=\"About numpy.amin\" class=\"wp-image-28610\" style=\"aspect-ratio:4\/3;object-fit:cover\" srcset=\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2023\/10\/pexels-photo-9951077.jpeg 600w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2023\/10\/pexels-photo-9951077-300x169.jpeg 300w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><figcaption class=\"wp-element-caption\"><em>numpy.amin<\/em><\/figcaption><\/figure><\/div>\n\n\n<p>The amin() function of numpy provides the minimum value out of a range of numbers in an array, usually along an axis. It has a couple of uses, like finding the minimum value in :<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Signal<\/li>\n\n\n\n<li>Loss functions<\/li>\n\n\n\n<li>Temperature map<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-syntax-of-numpy-amin\"><span class=\"ez-toc-section\" id=\"Syntax_of_numpyamin\"><\/span>Syntax of numpy.amin()<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>The amin function is accepted in the given manner:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nnumpy.amin(arr, axis=None, out=None, keepdims=False)\n<\/pre><\/div>\n\n\n<p>It has the following parameters:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>arr<\/strong> <\/li>\n\n\n\n<li><strong>axis<\/strong> <\/li>\n\n\n\n<li><strong>out<\/strong> <\/li>\n\n\n\n<li><strong>keepdims<\/strong> <\/li>\n<\/ul>\n\n\n\n<p>Here, arr refers to the array that needs to be traversed. The axis attribute specifies the axis, i.e., horizontal or vertical. It can be none in the case of a one-dimensional array. The out parameter is used for the output, while keepdims lets us know if a user wants the same dimensions for the output and input array or not.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-working\"><span class=\"ez-toc-section\" id=\"Working\"><\/span>Working <span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Let&#8217;s have a look at two codes that elaborate on the working of the amin() function. The first example is for a flattened array, while 2nd one works along the two axes.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nimport numpy as np\n# Create a NumPy array.\narray = np.array(&#x5B;1, 2, 3, 4, 5])\n# Get the minimum value of the array.\nminimum_value = np.amin(array)\n# Print the minimum value.\nprint(minimum_value)\n<\/pre><\/div>\n\n\n<p>Henceforth, the output will be 1 for this 1-dimensional array. Let&#8217;s consider another example to observe the working of amin() along the two axes.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nimport numpy as np\n\n# Create a NumPy array.\narray = np.array(&#x5B;&#x5B;1, 2], &#x5B;3, 4]])\n\n# Get the minimum value of the array along the first axis.\nminfirst_axis = np.amin(array, axis=0)\n\n# Get the minimum value of the array along the second axis.\nminsecond_axis = np.amin(array, axis=1)\n\n# Print the minimum values.\nprint(minfirst_axis)\nprint(minsecond_axis)\n<\/pre><\/div>\n\n\n<p>Here, the preferred output will be:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\n&#x5B;1 3]\n&#x5B;1 2]\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"h-illustration-of-keepdims-parameter\"><span class=\"ez-toc-section\" id=\"Illustration_of_keepdims_parameter\"><\/span>Illustration of keepdims parameter<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>As suggested earlier, keepdims can have two boolean values- True or False. In case it has a True value, the dimensions of the input and output array will be the same. In contrast, in the case of False, we will observe reduced dimensions. It is a reduction operation precisely. It is extremely useful in cases where the user wants to&nbsp;broadcast the answer in the same dimensions as the original array after doing a reduction.&nbsp;<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nimport numpy as np\n\n# Create a NumPy array.\narr = np.array(&#x5B;&#x5B;1, 2], &#x5B;3, 4]])\n\n# along the 1st axis, with `keepdims` set to `True`.- vertical\nwith_keepdims = np.amin(arr, axis=0, keepdims=True)\n\n#along the 2nd axis, with `keepdims` set to `False`.- horizontal\nwithout_keepdims = np.amin(arr, axis=1, keepdims=False)\n\n# see the minimum values in both cases\nprint(with_keepdims)\nprint(without_keepdims)\n<\/pre><\/div>\n\n\n<p>Here, the suggested output will be:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\n&#x5B;&#x5B;1 3]]\n&#x5B;1 2]\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"h-return-type\"><span class=\"ez-toc-section\" id=\"Return_type\"><\/span>Return type <span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>It depends on two things:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>input array<\/li>\n\n\n\n<li>keepdims attribute (True or False)<\/li>\n<\/ul>\n\n\n\n<p>To <a href=\"http:\/\/www.pythonpool.com\/check-data-type-python\/\" target=\"_blank\" rel=\"noopener\">check the data type<\/a> of the array, we use dtype as portrayed in the example:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nimport numpy as np\n\n# NumPy array of scalar values.\narray = np.array(&#x5B;1, 2, 3, 4, 5])\n\n# minimum value of the array.\nminimum_value = np.amin(array)\n\n# check the minimum value and its data type.\nprint(minimum_value, minimum_value.dtype)\n<\/pre><\/div>\n\n\n<p>Thus, the output is:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\n1 int32\n<\/pre><\/div>\n\n<div class=\"monsterinsights-inline-popular-posts monsterinsights-inline-popular-posts-india monsterinsights-popular-posts-styled\" ><div class=\"monsterinsights-inline-popular-posts-text\"><span class=\"monsterinsights-inline-popular-posts-label\" >Trending:<\/span><span class=\"monsterinsights-inline-popular-posts-border\" ><\/span><div class=\"monsterinsights-inline-popular-posts-post\"><a class=\"monsterinsights-inline-popular-posts-title\"  href=\"https:\/\/www.pythonpool.com\/fixed-typeerror-cant-compare-datetime-datetime-to-datetime-date\/\">[Fixed] typeerror can&#8217;t compare datetime.datetime to datetime.date<\/a><\/div><\/div><\/div><p><\/p>\n\n\n<h2 class=\"wp-block-heading\" id=\"h-the-preferred-dtypes\"><span class=\"ez-toc-section\" id=\"The_preferred_dtypes\"><\/span><strong>The prefe<\/strong>rred<strong> dtype<\/strong>s <span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>There are two dtypes that are commonly used with numpy.amin:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><code>np.float64<\/code><\/strong><\/li>\n\n\n\n<li><strong><code>np.int64<\/code><\/strong><\/li>\n<\/ul>\n\n\n\n<p>They work accurately for the amin function. However, it works with <code>np.float32<\/code>, <code>np.int32<\/code>, and <code>np.complex128<\/code> also. For large float arrays, <code>np.float64<\/code> dtype is used, whereas for small integer arrays, <code>np.int32<\/code> dtype is preferred. The given code shows how it can be used with the float64 dtype.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nimport numpy as np\n\n# Create a NumPy array of floating-point numbers.\narray = np.array(&#x5B;1.0, 2.0, 3.0, 4.0, 5.0], dtype=np.float64)\n\n# Get the minimum value of the array.\nmin = np.amin(array)\n\n# Print the minimum value and its data type.\nprint(min, min.dtype)\n\n#output: \n#1.0 float64\n<\/pre><\/div>\n\n\n<p>It works similarly for complex numbers. Eg:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nimport numpy as np\n\n# Create a NumPy array of complex numbers.\narray = np.array(&#x5B;1 + 2j, 3 - 4j, 5 + 6j, 7 - 8j], dtype=np.complex128)\n\n# Get the minimum value of the array.\nmin = np.amin(array)\n\n# Print the minimum value and its data type.\nprint(min, min.dtype)\n\n#output:\n#(1+2j) complex128\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"h-the-performance-boost\"><span class=\"ez-toc-section\" id=\"The_Performance_Boost\"><\/span>The Performance Boost <span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>To get efficient output,  the following tips are suggested:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use <code>np.float64<\/code>&nbsp;for floating-point arrays,&nbsp;<code>np.int64<\/code>&nbsp;for integer arrays<\/li>\n\n\n\n<li>Use it for small arrays.<\/li>\n\n\n\n<li>Assign a value to <strong><code>keepdims<\/code><\/strong> an attribute to have just one output value.<\/li>\n\n\n\n<li>np.nanmin() can avoid NaN values if they exist.<\/li>\n<\/ul>\n\n\n\n<p>These will definitely aid the user in traversing arrays in a better format.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-amin-for-minimum-signal\"><span class=\"ez-toc-section\" id=\"amin_for_minimum_signal\"><\/span>amin for minimum signal<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>The amin function can be utilized to gauge the minimum signal with both time constraints and space constraints. For example, a user can find the minimum signal over a period of time. Consider the given example for better analysis.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nimport numpy as np\n\n# Create a signal array.\nsignal = np.array(&#x5B;&#x5B;1, 2, 3], &#x5B;4, 5, 6]])\n\n# Find the minimum value of the signal along the time axis.\nmin = np.amin(signal, axis=0)\n\n# Print the minimum value.\nprint(min)\n<\/pre><\/div>\n\n\n<p>In this example, the minimum signal along the horizontal axis i.e., rows, has been taken. Thus, the output is:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\n&#x5B;1 4]\n<\/pre><\/div>\n\n<div class=\"monsterinsights-inline-popular-posts monsterinsights-inline-popular-posts-golf monsterinsights-popular-posts-styled\" ><div class=\"monsterinsights-inline-popular-posts-text\"><span class=\"monsterinsights-inline-popular-posts-label\" >Popular now<\/span><span class=\"monsterinsights-inline-popular-posts-border\" ><\/span><span class=\"monsterinsights-inline-popular-posts-border-2\" ><\/span><div class=\"monsterinsights-inline-popular-posts-post\"><a class=\"monsterinsights-inline-popular-posts-title\"  href=\"https:\/\/www.pythonpool.com\/fixed-nameerror-name-unicode-is-not-defined\/\">[Fixed] nameerror: name Unicode is not defined<\/a><\/div><\/div><\/div><p><\/p>\n\n\n<h2 class=\"wp-block-heading\" id=\"h-amin-for-signals-with-noise\"><span class=\"ez-toc-section\" id=\"amin_for_signals_with_noise\"><\/span>amin for <strong>signals with noise<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Some signals may not be entirely pure. They might have nan values too. As a result, an extension of np.amin() i.e., np.nanmin() is used. This function aims to have a noise-free processing of signal. The following example explains this well.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nimport numpy as np\n\n# Create a signal array with noise.\nsignal = np.array(&#x5B;1, 2, 3, 4, 5, np.nan, 7, 8, 9, 10])\n\n# Find the minimum value of the signal with noise, ignoring the NaN values.\nmin = np.nanmin(signal)\n\n# Print the minimum value.\nprint(min)\n<\/pre><\/div>\n\n\n<p><strong>Thus, Output will be displayed in the given manner as null values have been ignored.<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\n1.0\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"h-numpy-amin-for-multidimensional-array\"><span class=\"ez-toc-section\" id=\"numpy_amin_for_multidimensional_array\"><\/span>numpy amin for multidimensional array<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>The amin function of numpy can be used with multidimensional arrays also. Thus, whether you wish to find a minimum of a group of numbers in a flattened array or an array with greater than one dimension, you can go for the amin function present in the numpy library.<\/p>\n\n\n\n<p>For arrays with more than one dimension, the user is supposed to mention the axis along which he wants to calculate the mean. The numpy library considers the axis as a necessary parameter here. You can find the mean either along the rows or along the columns.<\/p>\n\n\n\n<p>Have a look at the given example to understand how you can work with a multidimensional array in order to find the mean. This particular example considers row-wise traversal of the array.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nimport numpy as np\n\n# Create a 2D NumPy array.\narray = np.array(&#x5B;&#x5B;1, 2], &#x5B;3, 4]])\n\n# Find the minimum value of the array along the first axis.\nminimum_value = np.amin(array, axis=0)\n\n# Print the minimum value.\nprint(minimum_value)\n<\/pre><\/div>\n\n\n<p>Therefore, you will get the output as: [1 3]. Similarly, you can work on 3-dimensional arrays to find the minimum element. In the case of a three-dimensional array, you can specify two axes at the same time, like <strong>axis=0,1<\/strong>.<\/p>\n\n\n\n<p>The given example works for a 3 dimensional array. Here, two axes &#8211; both horizontal and vertical are considered.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nimport numpy as np\n\n# Create a 3D NumPy array.\narray = np.array(&#x5B;&#x5B;1, 2, 3], &#x5B;4, 5, 6]])\n\n# Find the minimum value of the array along the first and second axes.\nminimum_value = np.amin(array, axis=(0, 1))\n\n# Print the minimum value.\nprint(minimum_value)\n<\/pre><\/div>\n\n\n<p>On final execution of the code, you will get the output as: [1 4]<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-numpy-amin-vs-min\"><span class=\"ez-toc-section\" id=\"numpy_amin_vs_min\"><\/span>numpy amin vs. min<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>A clear difference exists between <a href=\"http:\/\/www.pythonpool.com\/python-min\/\" target=\"_blank\" rel=\"noopener\">min and amin functions<\/a> of numpy. Consider the tabulated form of these differences.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th class=\"has-text-align-center\" data-align=\"center\">min()<\/th><th class=\"has-text-align-center\" data-align=\"center\">amin()<\/th><\/tr><\/thead><tbody><tr><td class=\"has-text-align-center\" data-align=\"center\">It is independent of any axis<\/td><td class=\"has-text-align-center\" data-align=\"center\">Provides a scalar value for a 1D array  or keepdims is False<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">Returns the array only for a multidimensional array or keepdims is True<\/td><td class=\"has-text-align-center\" data-align=\"center\">One can obtain minimum value along a specific axis<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">Provides a scalar value<\/td><td class=\"has-text-align-center\" data-align=\"center\">Provides a scalar value for 1D array  or keepdims is False<\/td><\/tr><\/tbody><\/table><figcaption class=\"wp-element-caption\">numpy amin vs min<\/figcaption><\/figure>\n\n\n<div class=\"monsterinsights-inline-popular-posts monsterinsights-inline-popular-posts-alpha monsterinsights-popular-posts-styled\" ><div class=\"monsterinsights-inline-popular-posts-text\"><span class=\"monsterinsights-inline-popular-posts-label\" >Trending<\/span><div class=\"monsterinsights-inline-popular-posts-post\"><a class=\"monsterinsights-inline-popular-posts-title\"  href=\"https:\/\/www.pythonpool.com\/solved-runtimeerror-cuda-error-invalid-device-ordinal\/\">[Solved] runtimeerror: cuda error: invalid device ordinal<\/a><\/div><\/div><\/div><p><\/p>\n\n\n<h2 class=\"wp-block-heading\" id=\"h-numpy-amin-alternatives\"><span class=\"ez-toc-section\" id=\"numpy_amin_alternatives\"><\/span>numpy amin alternatives<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>There are quite a few alternatives to the amin function of numpy. These are:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>min()<\/li>\n\n\n\n<li>np.argmin()<\/li>\n<\/ul>\n\n\n\n<p>If you want the index of the minimum element, go for the argmin() function of numpy. The argmin function accepts the same type of parameter array of numbers. The only difference is that it provides the index of the minimum element apart from the minimum element itself. The example below explains how one can use the argmin() function just like the amin() function of numpy.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nimport numpy as np\n\n# Create a NumPy array.\narray = np.arr(&#x5B;1, 2, 3, 4, 5])\n\n# Find the index of the first minimum element of the array.\nmin= np.argmin(array)\n\n# Print the minimum value and its index.\nprint(array&#x5B;min], min)\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"h-faqs-on-numpy-amin\"><span class=\"ez-toc-section\" id=\"FAQs_on_numpyamin\"><\/span>FAQs on numpy.amin<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<div class=\"schema-faq wp-block-yoast-faq-block\"><div class=\"schema-faq-section\" id=\"faq-question-1696511602421\"><strong class=\"schema-faq-question\">How to use np.amin() if it has NaN values?<\/strong> <p class=\"schema-faq-answer\">In the case of NaN values, use np.namin() function.<\/p> <\/div> <\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-conclusion\"><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span>Conclusion <span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>This article describes how we can make use of numpy.amin() function. It suggests the related syntax, use cases, and much more.  <\/p>\n\n\n<div class=\"monsterinsights-widget-popular-posts monsterinsights-widget-popular-posts-delta monsterinsights-popular-posts-styled monsterinsights-widget-popular-posts-columns-2\"><h2 class=\"monsterinsights-widget-popular-posts-widget-title\"><span class=\"ez-toc-section\" id=\"Trending_Python_Articles\"><\/span>Trending Python Articles<span class=\"ez-toc-section-end\"><\/span><\/h2><ul class=\"monsterinsights-widget-popular-posts-list\"><li ><a href=\"https:\/\/www.pythonpool.com\/fixed-typeerror-cant-compare-datetime-datetime-to-datetime-date\/\"><div class=\"monsterinsights-widget-popular-posts-image\"><img decoding=\"async\" src=\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/typeerror-cant-compare-datetime.datetime-to-datetime.date_-300x157.webp\" srcset=\" https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/typeerror-cant-compare-datetime.datetime-to-datetime.date_-300x157.webp 300w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/typeerror-cant-compare-datetime.datetime-to-datetime.date_-1024x536.webp 1024w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/typeerror-cant-compare-datetime.datetime-to-datetime.date_-768x402.webp 768w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/typeerror-cant-compare-datetime.datetime-to-datetime.date_.webp 1200w \" alt=\"[Fixed] typeerror can&#8217;t compare datetime.datetime to datetime.date\" \/><\/div><div class=\"monsterinsights-widget-popular-posts-text\"><span class=\"monsterinsights-widget-popular-posts-title\" >[Fixed] typeerror can&#8217;t compare datetime.datetime to datetime.date<\/span><div class=\"monsterinsights-widget-popular-posts-meta\" ><span class=\"monsterinsights-widget-popular-posts-author\">by Namrata Gulati<\/span><span>&#9679;<\/span><span class=\"monsterinsights-widget-popular-posts-date\">January 11, 2024<\/span><\/div><\/div><\/a><\/li><li ><a href=\"https:\/\/www.pythonpool.com\/fixed-nameerror-name-unicode-is-not-defined\/\"><div class=\"monsterinsights-widget-popular-posts-image\"><img decoding=\"async\" src=\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Fixed-nameerror-name-Unicode-is-not-defined-300x157.webp\" srcset=\" https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Fixed-nameerror-name-Unicode-is-not-defined-300x157.webp 300w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Fixed-nameerror-name-Unicode-is-not-defined-1024x536.webp 1024w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Fixed-nameerror-name-Unicode-is-not-defined-768x402.webp 768w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Fixed-nameerror-name-Unicode-is-not-defined.webp 1200w \" alt=\"[Fixed] nameerror: name Unicode is not defined\" \/><\/div><div class=\"monsterinsights-widget-popular-posts-text\"><span class=\"monsterinsights-widget-popular-posts-title\" >[Fixed] nameerror: name Unicode is not defined<\/span><div class=\"monsterinsights-widget-popular-posts-meta\" ><span class=\"monsterinsights-widget-popular-posts-author\">by Namrata Gulati<\/span><span>&#9679;<\/span><span class=\"monsterinsights-widget-popular-posts-date\">January 2, 2024<\/span><\/div><\/div><\/a><\/li><li ><a href=\"https:\/\/www.pythonpool.com\/solved-runtimeerror-cuda-error-invalid-device-ordinal\/\"><div class=\"monsterinsights-widget-popular-posts-image\"><img decoding=\"async\" src=\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Solved-runtimeerror-cuda-error-invalid-device-ordinal-300x157.webp\" srcset=\" https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Solved-runtimeerror-cuda-error-invalid-device-ordinal-300x157.webp 300w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Solved-runtimeerror-cuda-error-invalid-device-ordinal-1024x536.webp 1024w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Solved-runtimeerror-cuda-error-invalid-device-ordinal-768x402.webp 768w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Solved-runtimeerror-cuda-error-invalid-device-ordinal.webp 1200w \" alt=\"[Solved] runtimeerror: cuda error: invalid device ordinal\" \/><\/div><div class=\"monsterinsights-widget-popular-posts-text\"><span class=\"monsterinsights-widget-popular-posts-title\" >[Solved] runtimeerror: cuda error: invalid device ordinal<\/span><div class=\"monsterinsights-widget-popular-posts-meta\" ><span class=\"monsterinsights-widget-popular-posts-author\">by Namrata Gulati<\/span><span>&#9679;<\/span><span class=\"monsterinsights-widget-popular-posts-date\">January 2, 2024<\/span><\/div><\/div><\/a><\/li><li ><a href=\"https:\/\/www.pythonpool.com\/fixed-typeerror-type-numpy-ndarray-doesnt-define-__round__-method\/\"><div class=\"monsterinsights-widget-popular-posts-image\"><img decoding=\"async\" src=\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Fixed-typeerror-type-numpy.ndarray-doesnt-define-__round__-method-300x157.webp\" srcset=\" https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Fixed-typeerror-type-numpy.ndarray-doesnt-define-__round__-method-300x157.webp 300w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Fixed-typeerror-type-numpy.ndarray-doesnt-define-__round__-method-1024x536.webp 1024w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Fixed-typeerror-type-numpy.ndarray-doesnt-define-__round__-method-768x402.webp 768w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Fixed-typeerror-type-numpy.ndarray-doesnt-define-__round__-method.webp 1200w \" alt=\"[Fixed] typeerror: type numpy.ndarray doesn&#8217;t define __round__ method\" \/><\/div><div class=\"monsterinsights-widget-popular-posts-text\"><span class=\"monsterinsights-widget-popular-posts-title\" >[Fixed] typeerror: type numpy.ndarray doesn&#8217;t define __round__ method<\/span><div class=\"monsterinsights-widget-popular-posts-meta\" ><span class=\"monsterinsights-widget-popular-posts-author\">by Namrata Gulati<\/span><span>&#9679;<\/span><span class=\"monsterinsights-widget-popular-posts-date\">January 2, 2024<\/span><\/div><\/div><\/a><\/li><\/ul><\/div><p><\/p>","protected":false},"excerpt":{"rendered":"<p>In case you wish to find the minimum value from a set of values in an array, you are at the right place. Undoubtedly, numpy.amin &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"Power of Numpy.amin: A Step-by-Step Guide\" class=\"read-more button\" href=\"https:\/\/www.pythonpool.com\/numpy-amin\/#more-28159\" aria-label=\"More on Power of Numpy.amin: A Step-by-Step Guide\">Read more<\/a><\/p>\n","protected":false},"author":38,"featured_media":28985,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[1495],"tags":[],"class_list":["post-28159","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-numpy","infinite-scroll-item"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v20.1 (Yoast SEO v25.0) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Power of Numpy.amin: A Step-by-Step Guide - Python Pool<\/title>\n<meta name=\"description\" content=\"In case you wish to find the minimum value from a set of values in an array, numpy.amin is apt. Check this blog for more information\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.pythonpool.com\/numpy-amin\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Power of Numpy.amin: A Step-by-Step Guide\" \/>\n<meta property=\"og:description\" content=\"In case you wish to find the minimum value from a set of values in an array, you are at the right place. Undoubtedly, numpy.amin is the best numpy\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.pythonpool.com\/numpy-amin\/\" \/>\n<meta property=\"og:site_name\" content=\"Python Pool\" \/>\n<meta property=\"article:published_time\" content=\"2023-10-16T10:56:11+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-10-16T10:56:21+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2023\/10\/Numpy.amin_.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=\"Namrata Gulati\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@pythonpool\" \/>\n<meta name=\"twitter:site\" content=\"@pythonpool\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Namrata Gulati\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.pythonpool.com\/numpy-amin\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.pythonpool.com\/numpy-amin\/\"},\"author\":{\"name\":\"Namrata Gulati\",\"@id\":\"https:\/\/www.pythonpool.com\/#\/schema\/person\/294338f378f0853e6af4ca4a5a907ea6\"},\"headline\":\"Power of Numpy.amin: A Step-by-Step Guide\",\"datePublished\":\"2023-10-16T10:56:11+00:00\",\"dateModified\":\"2023-10-16T10:56:21+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.pythonpool.com\/numpy-amin\/\"},\"wordCount\":1025,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.pythonpool.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.pythonpool.com\/numpy-amin\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2023\/10\/Numpy.amin_.webp\",\"articleSection\":[\"Numpy\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.pythonpool.com\/numpy-amin\/#respond\"]}]},{\"@type\":[\"WebPage\",\"FAQPage\"],\"@id\":\"https:\/\/www.pythonpool.com\/numpy-amin\/\",\"url\":\"https:\/\/www.pythonpool.com\/numpy-amin\/\",\"name\":\"Power of Numpy.amin: A Step-by-Step Guide - Python Pool\",\"isPartOf\":{\"@id\":\"https:\/\/www.pythonpool.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.pythonpool.com\/numpy-amin\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.pythonpool.com\/numpy-amin\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2023\/10\/Numpy.amin_.webp\",\"datePublished\":\"2023-10-16T10:56:11+00:00\",\"dateModified\":\"2023-10-16T10:56:21+00:00\",\"description\":\"In case you wish to find the minimum value from a set of values in an array, numpy.amin is apt. Check this blog for more information\",\"breadcrumb\":{\"@id\":\"https:\/\/www.pythonpool.com\/numpy-amin\/#breadcrumb\"},\"mainEntity\":[{\"@id\":\"https:\/\/www.pythonpool.com\/numpy-amin\/#faq-question-1696511602421\"}],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.pythonpool.com\/numpy-amin\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.pythonpool.com\/numpy-amin\/#primaryimage\",\"url\":\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2023\/10\/Numpy.amin_.webp\",\"contentUrl\":\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2023\/10\/Numpy.amin_.webp\",\"width\":1200,\"height\":628,\"caption\":\"Numpy.amin\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.pythonpool.com\/numpy-amin\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.pythonpool.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Power of Numpy.amin: A Step-by-Step Guide\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.pythonpool.com\/#website\",\"url\":\"https:\/\/www.pythonpool.com\/\",\"name\":\"Python Pool\",\"description\":\"Your One-Stop Python Learning Destination\",\"publisher\":{\"@id\":\"https:\/\/www.pythonpool.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.pythonpool.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.pythonpool.com\/#organization\",\"name\":\"Python Pool\",\"url\":\"https:\/\/www.pythonpool.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.pythonpool.com\/#\/schema\/logo\/image\/\",\"url\":\"http:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/08\/aa.png\",\"contentUrl\":\"http:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/08\/aa.png\",\"width\":452,\"height\":185,\"caption\":\"Python Pool\"},\"image\":{\"@id\":\"https:\/\/www.pythonpool.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/x.com\/pythonpool\",\"https:\/\/www.youtube.com\/c\/pythonpool\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.pythonpool.com\/#\/schema\/person\/294338f378f0853e6af4ca4a5a907ea6\",\"name\":\"Namrata Gulati\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.pythonpool.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/19c5e6bfbc6202d4017b79f726b2ad5e520491d67ff428a87c071afef23ecd89?s=96&d=wavatar&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/19c5e6bfbc6202d4017b79f726b2ad5e520491d67ff428a87c071afef23ecd89?s=96&d=wavatar&r=g\",\"caption\":\"Namrata Gulati\"}},{\"@type\":\"Question\",\"@id\":\"https:\/\/www.pythonpool.com\/numpy-amin\/#faq-question-1696511602421\",\"position\":1,\"url\":\"https:\/\/www.pythonpool.com\/numpy-amin\/#faq-question-1696511602421\",\"name\":\"How to use np.amin() if it has NaN values?\",\"answerCount\":1,\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"In the case of NaN values, use np.namin() function.\",\"inLanguage\":\"en-US\"},\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Power of Numpy.amin: A Step-by-Step Guide - Python Pool","description":"In case you wish to find the minimum value from a set of values in an array, numpy.amin is apt. Check this blog for more information","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:\/\/www.pythonpool.com\/numpy-amin\/","og_locale":"en_US","og_type":"article","og_title":"Power of Numpy.amin: A Step-by-Step Guide","og_description":"In case you wish to find the minimum value from a set of values in an array, you are at the right place. Undoubtedly, numpy.amin is the best numpy","og_url":"https:\/\/www.pythonpool.com\/numpy-amin\/","og_site_name":"Python Pool","article_published_time":"2023-10-16T10:56:11+00:00","article_modified_time":"2023-10-16T10:56:21+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2023\/10\/Numpy.amin_.webp","type":"image\/webp"}],"author":"Namrata Gulati","twitter_card":"summary_large_image","twitter_creator":"@pythonpool","twitter_site":"@pythonpool","twitter_misc":{"Written by":"Namrata Gulati","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.pythonpool.com\/numpy-amin\/#article","isPartOf":{"@id":"https:\/\/www.pythonpool.com\/numpy-amin\/"},"author":{"name":"Namrata Gulati","@id":"https:\/\/www.pythonpool.com\/#\/schema\/person\/294338f378f0853e6af4ca4a5a907ea6"},"headline":"Power of Numpy.amin: A Step-by-Step Guide","datePublished":"2023-10-16T10:56:11+00:00","dateModified":"2023-10-16T10:56:21+00:00","mainEntityOfPage":{"@id":"https:\/\/www.pythonpool.com\/numpy-amin\/"},"wordCount":1025,"commentCount":0,"publisher":{"@id":"https:\/\/www.pythonpool.com\/#organization"},"image":{"@id":"https:\/\/www.pythonpool.com\/numpy-amin\/#primaryimage"},"thumbnailUrl":"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2023\/10\/Numpy.amin_.webp","articleSection":["Numpy"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.pythonpool.com\/numpy-amin\/#respond"]}]},{"@type":["WebPage","FAQPage"],"@id":"https:\/\/www.pythonpool.com\/numpy-amin\/","url":"https:\/\/www.pythonpool.com\/numpy-amin\/","name":"Power of Numpy.amin: A Step-by-Step Guide - Python Pool","isPartOf":{"@id":"https:\/\/www.pythonpool.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.pythonpool.com\/numpy-amin\/#primaryimage"},"image":{"@id":"https:\/\/www.pythonpool.com\/numpy-amin\/#primaryimage"},"thumbnailUrl":"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2023\/10\/Numpy.amin_.webp","datePublished":"2023-10-16T10:56:11+00:00","dateModified":"2023-10-16T10:56:21+00:00","description":"In case you wish to find the minimum value from a set of values in an array, numpy.amin is apt. Check this blog for more information","breadcrumb":{"@id":"https:\/\/www.pythonpool.com\/numpy-amin\/#breadcrumb"},"mainEntity":[{"@id":"https:\/\/www.pythonpool.com\/numpy-amin\/#faq-question-1696511602421"}],"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.pythonpool.com\/numpy-amin\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.pythonpool.com\/numpy-amin\/#primaryimage","url":"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2023\/10\/Numpy.amin_.webp","contentUrl":"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2023\/10\/Numpy.amin_.webp","width":1200,"height":628,"caption":"Numpy.amin"},{"@type":"BreadcrumbList","@id":"https:\/\/www.pythonpool.com\/numpy-amin\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.pythonpool.com\/"},{"@type":"ListItem","position":2,"name":"Power of Numpy.amin: A Step-by-Step Guide"}]},{"@type":"WebSite","@id":"https:\/\/www.pythonpool.com\/#website","url":"https:\/\/www.pythonpool.com\/","name":"Python Pool","description":"Your One-Stop Python Learning Destination","publisher":{"@id":"https:\/\/www.pythonpool.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.pythonpool.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.pythonpool.com\/#organization","name":"Python Pool","url":"https:\/\/www.pythonpool.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.pythonpool.com\/#\/schema\/logo\/image\/","url":"http:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/08\/aa.png","contentUrl":"http:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/08\/aa.png","width":452,"height":185,"caption":"Python Pool"},"image":{"@id":"https:\/\/www.pythonpool.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/pythonpool","https:\/\/www.youtube.com\/c\/pythonpool"]},{"@type":"Person","@id":"https:\/\/www.pythonpool.com\/#\/schema\/person\/294338f378f0853e6af4ca4a5a907ea6","name":"Namrata Gulati","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.pythonpool.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/19c5e6bfbc6202d4017b79f726b2ad5e520491d67ff428a87c071afef23ecd89?s=96&d=wavatar&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/19c5e6bfbc6202d4017b79f726b2ad5e520491d67ff428a87c071afef23ecd89?s=96&d=wavatar&r=g","caption":"Namrata Gulati"}},{"@type":"Question","@id":"https:\/\/www.pythonpool.com\/numpy-amin\/#faq-question-1696511602421","position":1,"url":"https:\/\/www.pythonpool.com\/numpy-amin\/#faq-question-1696511602421","name":"How to use np.amin() if it has NaN values?","answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"In the case of NaN values, use np.namin() function.","inLanguage":"en-US"},"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/posts\/28159","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/users\/38"}],"replies":[{"embeddable":true,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/comments?post=28159"}],"version-history":[{"count":58,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/posts\/28159\/revisions"}],"predecessor-version":[{"id":29000,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/posts\/28159\/revisions\/29000"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/media\/28985"}],"wp:attachment":[{"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/media?parent=28159"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/categories?post=28159"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/tags?post=28159"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}