Skip to content
Merged
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
3 changes: 2 additions & 1 deletion lib/matplotlib/text.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,8 @@ def update(self, kwargs):
"""
bbox = kwargs.pop('bbox', None)
super(Text, self).update(kwargs)
self.set_bbox(bbox) # depends on font properties
if bbox:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably to be safe, this should be if bbox is not None:. I can't be sure if bbox is ever a numpy array or not, and doing a test like that on a numpy array will result in errors in some versions, I think.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If that is the case, we have a whole bunch of other places in the code have the same issue.

self.set_bbox(bbox) # depends on font properties

def __getstate__(self):
d = super(Text, self).__getstate__()
Expand Down