- qcelemental.compare(expected, computed, label=None, *, equal_phase=False, quiet=False, return_message=False, return_handler=None)[source]¶
Returns True if two integers, strings, booleans, or integer arrays are element-wise equal.
ndarray]) – int, bool, str or array-like of same. Reference value against which computed is compared.
ndarray]) – int, bool, str or array-like of same. Input value to compare against expected.
str]) – Label for passed and error messages. Defaults to calling function name.
bool) – Compare computed or its opposite as equal.
bool) – Whether to log the return message.
bool) – Whether to return tuple. See below.
Callable]) – Function to control printing, logging, raising, and returning. Specialized interception for interfacing testing systems.
- Return type:
allclose (bool) – Returns True if expected and computed are equal; False otherwise.
message (str) – When return_message=True, also return passed or error message.
For scalar exactly-comparable types and for arbitrary-dimension, np.ndarray-castable, uniform-type, exactly-comparable types. For mixed types, use