Movatterモバイル変換


[0]ホーム

URL:


SciPy

numpy.ma.MaskedArray.argmax

MaskedArray.argmax(axis=None,fill_value=None,out=None)[source]

Returns array of indices of the maximum values along the given axis.Masked values are treated as if they had the value fill_value.

Parameters:

axis : {None, integer}

If None, the index is into the flattened array, otherwise alongthe specified axis

fill_value : {var}, optional

Value used to fill in the masked values. If None, the output ofmaximum_fill_value(self._data) is used instead.

out : {None, array}, optional

Array into which the result can be placed. Its type is preservedand it must be of the right shape to hold the output.

Returns:

index_array : {integer_array}

Examples

>>>a=np.arange(6).reshape(2,3)>>>a.argmax()5>>>a.argmax(0)array([1, 1, 1])>>>a.argmax(1)array([2, 2])

Previous topic

numpy.ma.MaskedArray.T

Next topic

numpy.ma.MaskedArray.argmin

  • © Copyright 2008-2009, The Scipy community.
  • Last updated on Jun 10, 2017.
  • Created usingSphinx 1.5.3.

[8]ページ先頭

©2009-2025 Movatter.jp