original_docstring: Estimates the potential density step of successive mesurements
  
         Expects the data to be recorded along the time, i.e. first measurement
           was recorded first. This makes difference since the first measurement
           has no reference to define the delta change.
         This is relevant for the type of instrument. For instance: XBTs are
           always measured surface to bottom, CTDs are expected the same, but
           Spray underwater gliders measure bottom to surface.
      
docstring: Estimates the potential density step of successive mesurements
  Expects the data to be recorded along the time, i.e. first measurement
  was recorded first. This makes difference since the first measurement
  has no reference to define the delta change.
  This is relevant for the type of instrument. For instance: XBTs are
  always measured surface to bottom, CTDs are expected the same, but
  Spray underwater gliders measure bottom to surface.
docstring_tokens: Estimates the potential density step of successive mesurements Expects the data to be recorded along the time i . e . first measurement was recorded first . This makes difference since the first measurement has no reference to define the delta change . This is relevant for the type of instrument . For instance : XBTs are always measured surface to bottom CTDs are expected the same but Spray underwater gliders measure bottom to surface .
code: def densitystep(SA, t, p, auto_rotate=False):
      """Estimates the potential density step of successive mesurements
  
         Expects the data to be recorded along the time, i.e. first measurement
           was recorded first. This makes difference since the first measurement
           has no reference to define the delta change.
         This is relevant for the type of instrument. For instance: XBTs are
           always measured surface to bottom, CTDs are expected the same, but
           Spray underwater gliders measure bottom to surface.
      """
      assert np.shape(t) == np.shape(p)
      assert np.shape(t) == np.shape(SA)
      assert np.ndim(t) == 1, "Not ready to densitystep an array ndim > 1"
  
      rho0 = gsw.pot_rho_t_exact(SA, t, p, 0)
      y = np.nan * np.atleast_1d(t)
      y[1:] = np.sign(np.diff(p)) * np.diff(rho0)
  
      if isinstance(y, ma.MaskedArray):
          y[y.mask] = np.nan
          y = y.data
  
      return y
code_tokens: def densitystep ( SA , t , p , auto_rotate = False ) : assert np . shape ( t ) == np . shape ( p ) assert np . shape ( t ) == np . shape ( SA ) assert np . ndim ( t ) == 1 , "Not ready to densitystep an array ndim > 1" rho0 = gsw . pot_rho_t_exact ( SA , t , p , 0 ) y = np . nan * np . atleast_1d ( t ) y [ 1 : ] = np . sign ( np . diff ( p ) ) * np . diff ( rho0 ) if isinstance ( y , ma . MaskedArray ) : y [ y . mask ] = np . nan y = y . data return y
short_docstring: Estimates the potential density step of successive mesurements
  Expects the data to be recorded along the time, i.e.
short_docstring_tokens: Estimates the potential density step of successive mesurements Expects the data to be recorded along the time i . e .
comment: """Estimates the potential density step of successive mesurements
  
         Expects the data to be recorded along the time, i.e. first measurement
           was recorded first. This makes difference since the first measurement
           has no reference to define the delta change.
         This is relevant for the type of instrument. For instance: XBTs are
           always measured surface to bottom, CTDs are expected the same, but
           Spray underwater gliders measure bottom to surface.
      """