Function tfc::utils::TFCUtils::onesRobust

Function tfc::utils::TFCUtils::onesRobust#

Function Documentation#

tfc.utils.TFCUtils.onesRobust(PyTree val)#
Returns ones_like val, but can handle arrays and dictionaries.

Parameters
----------
val : PyTree

Returns
-------
ones_like_val : PyTree
    Pytree with the same structure as val with all elements equal to one.