code: def probabilities(value, rows=0, cols=0):
      
      probs = list(map(probability, value.replace(',', ' ').split()))
      if rows and cols:
          probs = numpy.array(probs).reshape((len(rows), len(cols)))
      return probs
docs: :param value: input string, comma separated or space separated
      :param rows: the number of rows if the floats are in a matrix (0 otherwise)
      :param cols: the number of columns if the floats are in a matrix (or 0
      :returns: a list of probabilities
  
      >>> probabilities('')
      []
      >>> probabilities('1')
      [1.0]
      >>> probabilities('0.1 0.2')
      [0.1, 0.2]
      >>> probabilities('0.1, 0.2')  # commas are ignored
      [0.1, 0.2]