def _broadcast_cat_event_and_params(event, params, base_dtype):
if dtype_util.is_integer(event.dtype):<EOL><INDENT>pass<EOL><DEDENT>elif dtype_util.is_floating(event.dtype):<EOL><INDENT>event = tf.cast(event, dtype=tf.int32)<EOL><DEDENT>else:<EOL><INDENT>raise TypeError("<STR_LIT>"<EOL>"<STR_LIT>".format(base_dtype))<EOL><DEDENT>shape_known_statically = (<EOL>tensorshape_util.rank(params.shape) is not None and<EOL>tensorshape_util.is_fully_defined(params.shape[:-<NUM_LIT:1>]) and<EOL>tensorshape_util.is_fully_defined(event.shape))<EOL>if not shape_known_statically or params.shape[:-<NUM_LIT:1>] != event.shape:<EOL><INDENT>params *= tf.ones_like(event[..., tf.newaxis],<EOL>dtype=params.dtype)<EOL>params_shape = tf.shape(input=params)[:-<NUM_LIT:1>]<EOL>event *= tf.ones(params_shape, dtype=event.dtype)<EOL>if tensorshape_util.rank(params.shape) is not None:<EOL><INDENT>tensorshape_util.set_shape(event, params.shape[:-<NUM_LIT:1>])<EOL><DEDENT><DEDENT>return event, params<EOL>
Broadcasts the event or distribution parameters.