original_docstring: Divisively normalize an array to sum to 1.0
docstring: Divisively normalize an array to sum to 1.0
docstring_tokens: Divisively normalize an array to sum to 1 . 0
code: def divisive_normalization(weights):
      """Divisively normalize an array to sum to 1.0"""
      s = weights.sum()
      if s != 0:
          factor = 1.0/s
          weights *= factor
code_tokens: def divisive_normalization ( weights ) : s = weights . sum ( ) if s != 0 : factor = 1.0 / s weights *= factor
short_docstring: Divisively normalize an array to sum to 1.0
short_docstring_tokens: Divisively normalize an array to sum to 1 . 0
comment: """Divisively normalize an array to sum to 1.0"""