Skip to content

Commit

Permalink
Fix mock __array__ interface
Browse files Browse the repository at this point in the history
Addresses a backwards compatibility bug introduced in #3803
  • Loading branch information
mwaskom committed Jan 26, 2025
1 parent eb0b5cc commit f1edab5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ class ArrayLike:
def __init__(self, data):
self.data = data

def __array__(self, dtype=None, copy=None):
return np.asarray(self.data, dtype=dtype, copy=copy)
def __array__(self, **kwargs):
return np.asarray(self.data, **kwargs)

p = mat._HeatMapper(ArrayLike(self.x_norm), **self.default_kws)
npt.assert_array_equal(p.plot_data, self.x_norm)
Expand Down

0 comments on commit f1edab5

Please sign in to comment.