[ILNumerics Computing Engine]

**Namespace:**ILNumerics

**Assembly:**ILNumerics.Computing (in ILNumerics.Computing.dll) Version: 5.5.0.0 (5.5.7503.3146)

public static RetArray<uint> max( BaseArray<uint> A, OutArray<long> I = null, int dim = -1, bool keepdim = true )

#### Parameters

- A
- Type: ILNumericsBaseArrayUInt32

Input array. - I (Optional)
- Type: ILNumericsOutArrayInt64

[Optional] Output: 0-based index values of the found elements along the working dimension. Default: (null) don't return the indices. - dim (Optional)
- Type: SystemInt32

The index of the dimension to be reduced. - keepdim (Optional)
- Type: SystemBoolean

[Optional] True: reduced singleton dimension is not removed from the output (default). False: the new singleton dimension is removed.

#### Return Value

Type: RetArrayUInt32New array with the same shape as A except that the dimension specified by dim is reduced to length min(1,A.S[dim]) and removed if keepdim is false.

Exception | Condition |
---|---|

ArgumentException | If A.S[dim] == 0 and keepdim was false. |

Empty arrays are handled in the same way as other shapes: the dimension specified by dim is reduced to 1. If A.S[dim] == 0 the dims dimension length in the array returned will also be 0.

Scalar arrays: numpy scalars give a numpy scalar (0 dim) as output.

Special floating point values (for floating point element types): positive and negative infinity are handled in the regular way. NaN ('not a number') values are ignored. If all elements in a working dimension are NaN, NaN is returned as result in the corresponding output element.

If the optional output parameter I is not null on entry the function computes and returns the indices in A of the values returned. Thus, I has the same shape as the return array. If the storage of I on entry is sufficient (i.e.: large enough and not shared with other arrays) it will be directly used for storing the indices and I is reshaped as required. Otherwise, a new array is created and returned. In order to safe the index computation null can be provided as I which is the default.

If I is requested and multiple elements along the working dimension in A have the same maximum value it is undefined which element is 'picked' for the output. Hence, in this case the corresponding value in I is undefined and may point to the first or any other occurrence of the value returned from the working dimension.

[ILNumerics Computing Engine]