Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions lib/matplotlib/transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -1570,6 +1570,14 @@ def __eq__(self, other):
return np.all(self.get_matrix() == other.get_matrix())
return NotImplemented

# python3 requires that if a class defines __eq__ then in must
# define __hash__ if they need to be hashable (so that if a == b
# then hash(a) == hash(b)). Define 64bit hash by pulling the
# first 8 characters out of a sha1 hash of the matrix see issue
# #2828
def __hash__(self):
return hash(self.get_matrix().tostring)

def transform(self, values):
return self.transform_affine(values)
transform.__doc__ = Transform.transform.__doc__
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy