🌐
GeeksforGeeks
geeksforgeeks.org › python › numpy-maximum-in-python
numpy.maximum() in Python - GeeksforGeeks
December 19, 2025 - Example: This example shows how numpy.maximum() compares two numbers and returns the larger one. Python · import numpy as np a = 10 b = 21 print(np.maximum(a, b)) Output · 21 · numpy.maximum(arr1, arr2, /, out=None, *, where=True, ...
🌐
Programiz
programiz.com › python-programming › numpy › methods › maximum
NumPy maximum() (With Examples)
Here, maximum() compares the corresponding elements of array1 and array2 and returns a new array result with the maximum value at each position. import numpy as np array1 = np.array([1, 3, 5, 7, 9]) array2 = np.array([2, 4, 6, 8, 10]) # create an empty array with the same shape as array1 output ...
🌐
NumPy
numpy.org › doc › 2.2 › reference › generated › numpy.max.html
numpy.max — NumPy v2.2 Manual
Notice that the initial value is used as one of the elements for which the maximum is determined, unlike for the default argument Python’s max function, which is only used for empty iterables.
🌐
Codecademy
codecademy.com › docs › python:numpy › built-in functions › .max()
Python:NumPy | Built-in Functions | .max() | Codecademy
July 2, 2025 - If axis is specified, returns an array with maximum values along the specified axis. Note: If any element in the input array is NaN, the function will return NaN. To ignore NaN values, use np.nanmax() instead. This example demonstrates finding the maximum value in a one-dimensional array:
🌐
DataCamp
datacamp.com › doc › numpy › max
NumPy max()
import numpy as np matrix = np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9]]) max_in_columns = np.max(matrix, axis=0) print(max_in_columns) Here, `np.max(matrix, axis=0)` computes the maximum values along each column, resulting in `[7, 8, 9]`. max_in_rows = np.max(matrix, axis=1) print(max_in_rows) In this additional example, `np.max(matrix, axis=1)` computes the maximum values along each row, resulting in `[3, 6, 9]`.
🌐
Python Examples
pythonexamples.org › python-numpy-maximum-value-of-array
Python Program - Maximum Value of Numpy Array - numpy.max()
Python Program to get the maximum value of Numpy Array - To get the maximum value of a Numpy Array, use numpy function numpy.max(). Example programs contain a numpy array and finding the element with maximum or largest value.
🌐
Real Python
realpython.com › numpy-max-maximum
NumPy's max() and maximum(): Find Extreme Values in Arrays – Real Python
October 22, 2025 - NumPy follows the standard Python convention for ranges and returns an ndarray containing the integers 0 to 9. The second example specifies a starting value of 2, an upper limit of 3, and an increment of 0.1.
Find elsewhere
🌐
Programiz
programiz.com › python-programming › numpy › methods › max
NumPy max()
If axis = 1, the maximum of the largest element in each row is returned. import numpy as np array = np.array([[10, 17, 25], [15, 11, 22]])
🌐
EDUCBA
educba.com › home › software development › software development tutorials › numpy tutorial › numpy max
NumPy max | Working of NumPy max with Examples
June 15, 2023 - We create an array using the array function from NumPy and assign it to the variable namarray. We display the elements of namarray on the screen. Next, we use the max function, passing namarray as the parameter, to find the maximum value.
Address: Unit no. 202, Jay Antariksh Bldg, Makwana Road, Marol, Andheri (East),, 400059, Mumbai
🌐
Vultr Docs
docs.vultr.com › python › third party › numpy › maximum()
Python Numpy maximum() - Find Maximum Value
November 18, 2024 - The function processes two 2x2 matrices comparing each element at identical positions. The resulting matrix, [2, 3], [6, 7], comprises the maximum values from both matrices. Using NumPy's maximum() function, effectively streamlines the process ...
🌐
NumPy
numpy.org › devdocs › reference › generated › numpy.max.html
numpy.max — NumPy v2.6.dev0 Manual
Maximum of a. If axis is None, the result is a scalar value. If axis is an int, the result is an array of dimension a.ndim - 1.
🌐
Tutorial Gateway
tutorialgateway.org › python-numpy-max
Python numpy max
September 18, 2022 - In this example, np.max(a, axis = 1, out = x) will save the maximum of each row result in x array. import numpy as np a = np.random.randint(10, 80, size = (5, 4)) print(a) x = np.arange(5) b = np.max(a, axis = 1) print(b) np.max(a, axis = 1, out = x) print('x = ', x) [[47 14 73 75] [35 60 64 ...
🌐
NumPy
numpy.org › doc › stable › reference › generated › numpy.max.html
numpy.max — NumPy v2.5 Manual
Notice that the initial value is used as one of the elements for which the maximum is determined, unlike for the default argument Python’s max function, which is only used for empty iterables.
🌐
NumPy
numpy.org › doc › 2.1 › reference › generated › numpy.max.html
numpy.max — NumPy v2.1 Manual
Maximum of a. If axis is None, the result is a scalar value. If axis is an int, the result is an array of dimension a.ndim - 1.
🌐
Educative
educative.io › answers › what-is-numpymaximum-in-python
What is numpy.maximum() in Python?
numpy.maximum(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) = <ufunc 'maximum'> In the syntax given above, x1 and x2 are non-optional parameters and the rest are optional parameters.