aesara.tensor.allclose#
- aesara.tensor.allclose(a, b, rtol=1e-05, atol=1e-08, equal_nan=False)[source]#
Implement Numpy’s
allclose
on tensors.absolute(a - b) <= (atol + rtol * absolute(b))
- Parameters:
a (tensor) – Input to compare.
b (tensor) – Input to compare.
rtol (float) – The relative tolerance parameter.
atol (float) – The absolute tolerance parameter.
equal_nan (bool) – Whether to consider nan’s in the same place to be close.
- Returns:
A boolean value (of type int8 returned by the tensor elementwise
all
function) whether all elements in a and b are in the tolerance range defined above.- Return type:
bool
Notes
Not a symmetric equation. See Numpy’s documentation.