def _squeeze_output(out):
 out = out.squeeze()
 if (out.ndim == 0):
  out = out[()]
 return out

def _squeeze_output ( out ) : out = out . squeeze ( ) if ( out . ndim == 0 ) : out = out [ ( ) ] return out
remove single-dimensional entries from array and convert to scalar .