PreserveRVMappings.update_rv_maps(old_rv, new_value, new_rv=None)[source]#

Update mappings for a random variable.

It also creates/updates a map from new value variables to their original value variables.

  • old_rv (TensorVariable) – The random variable whose mappings will be updated.

  • new_value (TensorVariable) – The new value variable that will replace the current one assigned to old_rv.

  • new_rv (Optional[TensorVariable]) – When non-None, old_rv will also be replaced with new_rv in the mappings, as well.