pyphi.numerics.eq_mask#

pyphi.numerics.eq_mask(array, value)[source]#

Return a boolean mask of the elements equal to value up to config.numerics.precision.

Elementwise-equivalent to eq(). The comparison replicates math.isclose — a symmetric relative tolerance with an absolute floor, and non-finite values equal only to themselves — which differs from np.isclose’s asymmetric additive form.

Parameters:
Return type:

ndarray