parameters: (self, axis=-1, kind=None, order=None,
               endwith=True, fill_value=None)
docstring: Sort the array, in-place
  
          Parameters
          ----------
          a : array_like
              Array to be sorted.
          axis : int, optional
              Axis along which to sort. If None, the array is flattened before
              sorting. The default is -1, which sorts along the last axis.
          kind : {'quicksort', 'mergesort', 'heapsort', 'stable'}, optional
              The sorting algorithm used.
          order : list, optional
              When `a` is a structured array, this argument specifies which fields
              to compare first, second, and so on.  This list does not need to
              include all of the fields.
          endwith : {True, False}, optional
              Whether missing values (if any) should be treated as the largest values
              (True) or the smallest values (False)
              When the array contains unmasked values sorting at the same extremes of the
              datatype, the ordering of these values and the masked values is
              undefined.
          fill_value : scalar or None, optional
              Value used internally for the masked values.
              If ``fill_value`` is not None, it supersedes ``endwith``.
  
          Returns
          -------
          sorted_array : ndarray
              Array of the same type and shape as `a`.
  
          See Also
          --------
          numpy.ndarray.sort : Method to sort an array in-place.
          argsort : Indirect sort.
          lexsort : Indirect stable sort on multiple keys.
          searchsorted : Find elements in a sorted array.
  
          Notes
          -----
          See ``sort`` for notes on the different sorting algorithms.
  
          Examples
          --------
          >>> a = np.ma.array([1, 2, 5, 4, 3],mask=[0, 1, 0, 1, 0])
          >>> # Default
          >>> a.sort()
          >>> a
          masked_array(data=[1, 3, 5, --, --],
                       mask=[False, False, False,  True,  True],
                 fill_value=999999)
  
          >>> a = np.ma.array([1, 2, 5, 4, 3],mask=[0, 1, 0, 1, 0])
          >>> # Put missing values in the front
          >>> a.sort(endwith=False)
          >>> a
          masked_array(data=[--, --, 1, 3, 5],
                       mask=[ True,  True, False, False, False],
                 fill_value=999999)
  
          >>> a = np.ma.array([1, 2, 5, 4, 3],mask=[0, 1, 0, 1, 0])
          >>> # fill_value takes over endwith
          >>> a.sort(endwith=False, fill_value=3)
          >>> a
          masked_array(data=[1, --, --, 3, 5],
                       mask=[False,  True,  True, False, False],
                 fill_value=999999)
docstring_summary: Sort the array, in-place
docstring_tokens: Sort the array in - place
function: def sort(self, axis=-1, kind=None, order=None,
               endwith=True, fill_value=None):
          """
          Sort the array, in-place
  
          Parameters
          ----------
          a : array_like
              Array to be sorted.
          axis : int, optional
              Axis along which to sort. If None, the array is flattened before
              sorting. The default is -1, which sorts along the last axis.
          kind : {'quicksort', 'mergesort', 'heapsort', 'stable'}, optional
              The sorting algorithm used.
          order : list, optional
              When `a` is a structured array, this argument specifies which fields
              to compare first, second, and so on.  This list does not need to
              include all of the fields.
          endwith : {True, False}, optional
              Whether missing values (if any) should be treated as the largest values
              (True) or the smallest values (False)
              When the array contains unmasked values sorting at the same extremes of the
              datatype, the ordering of these values and the masked values is
              undefined.
          fill_value : scalar or None, optional
              Value used internally for the masked values.
              If ``fill_value`` is not None, it supersedes ``endwith``.
  
          Returns
          -------
          sorted_array : ndarray
              Array of the same type and shape as `a`.
  
          See Also
          --------
          numpy.ndarray.sort : Method to sort an array in-place.
          argsort : Indirect sort.
          lexsort : Indirect stable sort on multiple keys.
          searchsorted : Find elements in a sorted array.
  
          Notes
          -----
          See ``sort`` for notes on the different sorting algorithms.
  
          Examples
          --------
          >>> a = np.ma.array([1, 2, 5, 4, 3],mask=[0, 1, 0, 1, 0])
          >>> # Default
          >>> a.sort()
          >>> a
          masked_array(data=[1, 3, 5, --, --],
                       mask=[False, False, False,  True,  True],
                 fill_value=999999)
  
          >>> a = np.ma.array([1, 2, 5, 4, 3],mask=[0, 1, 0, 1, 0])
          >>> # Put missing values in the front
          >>> a.sort(endwith=False)
          >>> a
          masked_array(data=[--, --, 1, 3, 5],
                       mask=[ True,  True, False, False, False],
                 fill_value=999999)
  
          >>> a = np.ma.array([1, 2, 5, 4, 3],mask=[0, 1, 0, 1, 0])
          >>> # fill_value takes over endwith
          >>> a.sort(endwith=False, fill_value=3)
          >>> a
          masked_array(data=[1, --, --, 3, 5],
                       mask=[False,  True,  True, False, False],
                 fill_value=999999)
  
          """
          if self._mask is nomask:
              ndarray.sort(self, axis=axis, kind=kind, order=order)
              return
  
          if self is masked:
              return
  
          sidx = self.argsort(axis=axis, kind=kind, order=order,
                              fill_value=fill_value, endwith=endwith)
  
          self[...] = np.take_along_axis(self, sidx, axis=axis)
function_tokens: def sort ( self , axis = - 1 , kind = None , order = None , endwith = True , fill_value = None ) : if self . _mask is nomask : ndarray . sort ( self , axis = axis , kind = kind , order = order ) return if self is masked : return sidx = self . argsort ( axis = axis , kind = kind , order = order , fill_value = fill_value , endwith = endwith ) self [ ... ] = np . take_along_axis ( self , sidx , axis = axis )