X Tutup
Skip to content
Merged
Show file tree
Hide file tree
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
10 changes: 5 additions & 5 deletions lib/matplotlib/axes/_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -4002,16 +4002,16 @@ def scatter(self, x, y, s=None, c=None, marker=None, cmap=None, norm=None,
else:
colors = None # use cmap, norm after collection is created

# Anything in maskargs will be unchanged unless it is the same length
# as x:
maskargs = x, y, s, c, colors, edgecolors, linewidths
# `delete_masked_points` only modifies arguments of the same length as
# `x`.
x, y, s, c, colors, edgecolors, linewidths =\
cbook.delete_masked_points(*maskargs)
cbook.delete_masked_points(
x, y, s, c, colors, edgecolors, linewidths)

scales = s # Renamed for readability below.

# to be API compatible
if marker is None and not (verts is None):
if marker is None and verts is not None:
marker = (verts, 0)
verts = None

Expand Down
7 changes: 2 additions & 5 deletions lib/matplotlib/cbook/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1497,15 +1497,12 @@ def __iter__(self):
The iterator is invalid if interleaved with calls to join().
"""
self.clean()

class Token:
pass
token = Token()
token = object()

# Mark each group as we come across if by appending a token,
# and don't yield it twice
for group in six.itervalues(self._mapping):
if not group[-1] is token:
if group[-1] is not token:
yield [x() for x in group]
group.append(token)

Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/mlab.py
Original file line number Diff line number Diff line change
Expand Up @@ -3348,7 +3348,7 @@ def griddata(x, y, z, xi, yi, interp='nn'):

# Remove masked points.
mask = np.ma.getmask(z)
if not (mask is np.ma.nomask):
if mask is not np.ma.nomask:
x = x.compress(~mask)
y = y.compress(~mask)
z = z.compressed()
Expand Down
X Tutup