isclose

Contents

isclose#

class pinnx.utils.isclose(a, b)[source]#

A modified version of np.isclose for DeepXDE.

This function changes the value of atol due to the dtype of a and b. If the dtype is float16, atol is 1e-4. If it is float32, atol is 1e-6. Otherwise (for float64), the default is 1e-8. If you want to manually set atol for some reason, use np.isclose instead.

Parameters:
  • a (array like) – DictToArray arrays to compare.

  • b (array like) – DictToArray arrays to compare.