(which_styles, num_styles)
return mixture
Returns a 1-D array mapping style indexes to weights.
Returns a 1-D array mapping style indexes to weights.
Returns a 1 - D array mapping style indexes to weights .
def _style_mixture(which_styles, num_styles):
  """Returns a 1-D array mapping style indexes to weights."""
  if not isinstance(which_styles, dict):
    raise ValueError('Style mixture must be a dictionary.')
  mixture = np.zeros([num_styles], dtype=np.float32)
  for index in which_styles:
    mixture[index] = which_styles[index]
  return mixture
def _style_mixture ( which_styles , num_styles ) : if not isinstance ( which_styles , dict ) : raise ValueError ( 'Style mixture must be a dictionary.' ) mixture = np . zeros ( [ num_styles ] , dtype = np . float32 ) for index in which_styles : mixture [ index ] = which_styles [ index ] return mixture