@@ -284,11 +284,11 @@ def _sample_n(self, n, seed=None):
284284 result_so_far = math_ops .ceil (x_samps )
285285
286286 if lower_cutoff is not None :
287- result_so_far = math_ops . select (result_so_far < lower_cutoff ,
287+ result_so_far = array_ops . where (result_so_far < lower_cutoff ,
288288 lower_cutoff * ones , result_so_far )
289289
290290 if upper_cutoff is not None :
291- result_so_far = math_ops . select (result_so_far > upper_cutoff ,
291+ result_so_far = array_ops . where (result_so_far > upper_cutoff ,
292292 upper_cutoff * ones , result_so_far )
293293
294294 return result_so_far
@@ -327,8 +327,8 @@ def _log_prob_with_logsf_and_logcdf(self, y):
327327 # In either case, we are doing Log[ exp{big} - exp{small} ]
328328 # We want to use the sf items precisely when we are on the right side of the
329329 # median, which occurs when logsf_y < logcdf_y.
330- big = math_ops . select (logsf_y < logcdf_y , logsf_y_minus_1 , logcdf_y )
331- small = math_ops . select (logsf_y < logcdf_y , logsf_y , logcdf_y_minus_1 )
330+ big = array_ops . where (logsf_y < logcdf_y , logsf_y_minus_1 , logcdf_y )
331+ small = array_ops . where (logsf_y < logcdf_y , logsf_y , logcdf_y_minus_1 )
332332
333333 return _logsum_expbig_minus_expsmall (big , small )
334334
@@ -357,7 +357,7 @@ def _prob_with_sf_and_cdf(self, y):
357357 cdf_y_minus_1 = self .cdf (y - 1 )
358358
359359 # sf_prob has greater precision iff we're on the right side of the median.
360- return math_ops . select (
360+ return array_ops . where (
361361 sf_y < cdf_y , # True iff we're on the right side of the median.
362362 sf_y_minus_1 - sf_y ,
363363 cdf_y - cdf_y_minus_1 )
@@ -386,9 +386,9 @@ def _log_cdf(self, y):
386386 # Re-define values at the cutoffs.
387387 if lower_cutoff is not None :
388388 neg_inf = - np .inf * array_ops .ones_like (result_so_far )
389- result_so_far = math_ops . select (j < lower_cutoff , neg_inf , result_so_far )
389+ result_so_far = array_ops . where (j < lower_cutoff , neg_inf , result_so_far )
390390 if upper_cutoff is not None :
391- result_so_far = math_ops . select (j >= upper_cutoff ,
391+ result_so_far = array_ops . where (j >= upper_cutoff ,
392392 array_ops .zeros_like (result_so_far ),
393393 result_so_far )
394394
@@ -418,11 +418,11 @@ def _cdf(self, y):
418418
419419 # Re-define values at the cutoffs.
420420 if lower_cutoff is not None :
421- result_so_far = math_ops . select (j < lower_cutoff ,
421+ result_so_far = array_ops . where (j < lower_cutoff ,
422422 array_ops .zeros_like (result_so_far ),
423423 result_so_far )
424424 if upper_cutoff is not None :
425- result_so_far = math_ops . select (j >= upper_cutoff ,
425+ result_so_far = array_ops . where (j >= upper_cutoff ,
426426 array_ops .ones_like (result_so_far ),
427427 result_so_far )
428428
@@ -452,12 +452,12 @@ def _log_survival_function(self, y):
452452
453453 # Re-define values at the cutoffs.
454454 if lower_cutoff is not None :
455- result_so_far = math_ops . select (j < lower_cutoff ,
455+ result_so_far = array_ops . where (j < lower_cutoff ,
456456 array_ops .zeros_like (result_so_far ),
457457 result_so_far )
458458 if upper_cutoff is not None :
459459 neg_inf = - np .inf * array_ops .ones_like (result_so_far )
460- result_so_far = math_ops . select (j >= upper_cutoff , neg_inf , result_so_far )
460+ result_so_far = array_ops . where (j >= upper_cutoff , neg_inf , result_so_far )
461461
462462 return result_so_far
463463
@@ -485,11 +485,11 @@ def _survival_function(self, y):
485485
486486 # Re-define values at the cutoffs.
487487 if lower_cutoff is not None :
488- result_so_far = math_ops . select (j < lower_cutoff ,
488+ result_so_far = array_ops . where (j < lower_cutoff ,
489489 array_ops .ones_like (result_so_far ),
490490 result_so_far )
491491 if upper_cutoff is not None :
492- result_so_far = math_ops . select (j >= upper_cutoff ,
492+ result_so_far = array_ops . where (j >= upper_cutoff ,
493493 array_ops .zeros_like (result_so_far ),
494494 result_so_far )
495495
0 commit comments