docstr: Normalize y into the range (-0.5, 0.5)
  Useful for allowing the leaf parameter prior to be 0, and to standardize the sigma prior
  
  Parameters
  ----------
  y - np.ndarray
  
  Returns
  -------
  np.ndarray
  
  Examples
  --------
  >>> Data.normalize_y([1, 2, 3])
  array([-0.5,  0. ,  0.5])
docstr_tok: ["Normalize","y","into","the","range","(","-0.5",",","0.5",")","Useful","for","allowing","the","leaf","parameter","prior","to","be","0",",","and","to","standardize","the","sigma","prior","Parameters","--","--","--","--","--","y","-","np.ndarray","Returns","--","--","--","-","np.ndarray","Examples","--","--","--","--",">",">",">","Data.normalize_y","(","[","1",",","2",",","3","]",")","array","(","[","-0.5",",","0.",",","0.5","]",")"]
code: def normalize_y(y: np.ndarray) -> np.ndarray:
      """
      Normalize y into the range (-0.5, 0.5)
      Useful for allowing the leaf parameter prior to be 0, and to standardize the sigma prior
  
      Parameters
      ----------
      y - np.ndarray
  
      Returns
      -------
      np.ndarray
  
      Examples
      --------
      >>> Data.normalize_y([1, 2, 3])
      array([-0.5,  0. ,  0.5])
      """
      # return y
      # return y - np.mean(y)
      y_min, y_max = np.min(y), np.max(y)
      return -0.5 + ((y - y_min) / (y_max - y_min))
  
imports: from operator import gt, le
  from typing import Any, List, Optional, Union
  import numpy
  import pandas
  from .errors import NoSplittableVariableException
  from .splitcondition import SplitCondition
label_desc: Use image node_id 2 for calling the Target obj's underlying member method code with example usage: obj.normalize_y(y) and returns: unknown