firecrown.utils.compare_optional_arrays

firecrown.utils.compare_optional_arrays#

firecrown.utils.compare_optional_arrays(x, y)[source]#

Compare two arrays, allowing for either or both to be None.

Parameters:
  • x (None | ndarray[tuple[int, ...], dtype[TypeVar(_ScalarType_co, bound= generic, covariant=True)]]) – first array

  • y (None | ndarray[tuple[int, ...], dtype[TypeVar(_ScalarType_co, bound= generic, covariant=True)]]) – second array

Return type:

bool

Returns:

whether the arrays are equal