MCPcopy
hub / github.com/numpy/numpy / min

Method min

numpy/matrixlib/defmatrix.py:691–724  ·  view source on GitHub ↗

Return the minimum value along an axis. Parameters ---------- See `amin` for complete descriptions. See Also -------- amin, ndarray.min Notes ----- This is the same as `ndarray.min`, but returns a `matrix` object

(self, axis=None, out=None)

Source from the content-addressed store, hash-verified

689 return N.ndarray.argmax(self, axis, out)._align(axis)
690
691 def min(self, axis=None, out=None):
692 """
693 Return the minimum value along an axis.
694
695 Parameters
696 ----------
697 See `amin` for complete descriptions.
698
699 See Also
700 --------
701 amin, ndarray.min
702
703 Notes
704 -----
705 This is the same as `ndarray.min`, but returns a `matrix` object
706 where `ndarray.min` would return an ndarray.
707
708 Examples
709 --------
710 >>> x = -np.matrix(np.arange(12).reshape((3,4))); x
711 matrix([[ 0, -1, -2, -3],
712 [ -4, -5, -6, -7],
713 [ -8, -9, -10, -11]])
714 >>> x.min()
715 -11
716 >>> x.min(0)
717 matrix([[ -8, -9, -10, -11]])
718 >>> x.min(1)
719 matrix([[ -3],
720 [ -7],
721 [-11]])
722
723 """
724 return N.ndarray.min(self, axis, out, keepdims=True)._collapse(axis)
725
726 def argmin(self, axis=None, out=None):
727 """

Callers 1

test_minMethod · 0.45

Calls 1

_collapseMethod · 0.80

Tested by 1

test_minMethod · 0.36