Indexing
indexing
¶
Functions¶
find_argmax_nonzero_value(array, keepdims=False, axis=1)
¶
Find the argmax of an array, setting entires with zero sum or finite values to nan
Parameters:
Name | Type | Description | Default |
---|---|---|---|
array |
ndarray
|
The input array |
required |
keepdims |
bool
|
Should the dimensions be kept. Defaults to False. |
False
|
axis |
int
|
Which axis to perform the argmax along. Defaults to 1. |
1
|
Returns:
Type | Description |
---|---|
array
|
np.array: The argmax, with nans for invalid or all-zero entries |