argmax

compas.geometry.argmax(values)[source]

Returns the index of the first maximum value within an array.

Parameters

values (list of float) – A list of values.

Notes

NumPy’s argmax function 1 is different, it returns an array of indices.

Examples

>>> argmax([2, 4, 4, 3])
1
Returns

int – The index of the first maximum value within an array.

References

1

https://numpy.org/doc/stable/reference/generated/numpy.argmax.html