Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Simplify pickling support.#17297

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
QuLogic merged 1 commit intomatplotlib:masterfromanntzer:getstate
May 1, 2020
Merged
Show file tree
Hide file tree
Changes fromall 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
10 changes: 0 additions & 10 deletionslib/matplotlib/cbook/__init__.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -256,16 +256,6 @@ def __init__(self, type, seq=None):
def __repr__(self):
return '<a list of %d %s objects>' % (len(self), self.type)

__str__ = __repr__

def __getstate__(self):
# store a dictionary of this SilentList's state
return {'type': self.type, 'seq': self[:]}

def __setstate__(self, state):
self.type = state['type']
self.extend(state['seq'])


@deprecated("3.3")
class IgnoredKeywordWarning(UserWarning):
Expand Down
24 changes: 2 additions & 22 deletionslib/matplotlib/gridspec.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -312,17 +312,7 @@ def __init__(self, nrows, ncols, figure=None,
_AllowedKeys = ["left", "bottom", "right", "top", "wspace", "hspace"]

def __getstate__(self):
state = self.__dict__
try:
state.pop('_layoutbox')
except KeyError:
pass
return state

def __setstate__(self, state):
self.__dict__ = state
# layoutboxes don't survive pickling...
self._layoutbox = None
return {**self.__dict__, "_layoutbox": None}

def update(self, **kwargs):
"""
Expand DownExpand Up@@ -580,17 +570,7 @@ def num2(self, value):
self._num2 = value

def __getstate__(self):
state = self.__dict__
try:
state.pop('_layoutbox')
except KeyError:
pass
return state

def __setstate__(self, state):
self.__dict__ = state
# layoutboxes don't survive pickling...
self._layoutbox = None
return {**self.__dict__, "_layoutbox": None}

def get_gridspec(self):
return self._gridspec
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp