MCPcopy
hub / github.com/google/tf-quant-finance / where

Method where

tf_quant_finance/datetime/tensor_wrapper.py:73–78  ·  view source on GitHub ↗

See tf.where. Only three-argument version is supported here.

(cls, condition, tensor_wrapper_1, tensor_wrapper_2)

Source from the content-addressed store, hash-verified

71
72 @classmethod
73 def where(cls, condition, tensor_wrapper_1, tensor_wrapper_2):
74 """See tf.where. Only three-argument version is supported here."""
75 tensor_wrappers = [tensor_wrapper_1, tensor_wrapper_2]
76 cls._validate_tensor_types(tensor_wrappers, "where")
77 return cls._apply_sequence_to_tensor_op(
78 lambda ts: tf.compat.v2.where(condition, ts[0], ts[1]), tensor_wrappers)
79
80 @classmethod
81 def _validate_tensor_types(cls, tensor_wrappers, function_name):

Callers 15

_gen_periodic_scheduleFunction · 0.80
_gen_business_daysFunction · 0.80
day_of_yearMethod · 0.80
actual_365_actualFunction · 0.80
thirty_360_isdaFunction · 0.80
_apply_roll_biz_spaceMethod · 0.80
business_days_betweenMethod · 0.80

Calls 2

Tested by 8

vol_fnMethod · 0.64
_vol_fnMethod · 0.64
_b_0Method · 0.64
callable_discount_factorFunction · 0.64
_get_implied_volFunction · 0.64