We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
2 parents7c6b465 +d80c9ce commit08877f8Copy full SHA for 08877f8
examples/misc/packed_bubbles.py
@@ -76,8 +76,7 @@ def check_collisions(self, bubble, bubbles):
76
77
defcollides_with(self,bubble,bubbles):
78
distance=self.outline_distance(bubble,bubbles)
79
-idx_min=np.argmin(distance)
80
-returnidx_miniftype(idx_min)==np.ndarrayelse [idx_min]
+returnnp.argmin(distance,keepdims=True)
81
82
defcollapse(self,n_iterations=50):
83
"""
lib/matplotlib/dviread.py
@@ -622,7 +622,7 @@ def __init__(self, scale, tfm, texname, vf):
622
forcharinrange(nchars)]
623
624
def__eq__(self,other):
625
-return (type(self)==type(other)
+return (type(self)istype(other)
626
andself.texname==other.texnameandself.size==other.size)
627
628
def__ne__(self,other):
lib/matplotlib/font_manager.py
@@ -851,7 +851,7 @@ def set_fontconfig_pattern(self, pattern):
851
pattern syntax for use here.
852
853
forkey,valinparse_fontconfig_pattern(pattern).items():
854
-iftype(val)==list:
+iftype(val)islist:
855
getattr(self,"set_"+key)(val[0])
856
else:
857
getattr(self,"set_"+key)(val)
lib/matplotlib/tests/test_axes.py
@@ -2834,12 +2834,12 @@ def _as_mpl_axes(self):
2834
2835
# testing axes creation with plt.axes
2836
ax=plt.axes([0,0,1,1],projection=prj)
2837
-asserttype(ax)==PolarAxes
+asserttype(ax)isPolarAxes
2838
plt.close()
2839
2840
# testing axes creation with subplot
2841
ax=plt.subplot(121,projection=prj)
2842
2843
2844
2845
lib/matplotlib/tests/test_cbook.py
@@ -224,7 +224,7 @@ def test_callback_complete(self, pickle):
224
225
# test that we can add a callback
226
cid1=self.connect(self.signal,mini_me.dummy,pickle)
227
-asserttype(cid1)==int
+asserttype(cid1)isint
228
self.is_not_empty()
229
230
# test that we don't add a second callback
@@ -249,7 +249,7 @@ def test_callback_disconnect(self, pickle):
249
250
251
252
253
254
255
self.disconnect(cid1)
@@ -267,7 +267,7 @@ def test_callback_wrong_disconnect(self, pickle):
267
268
269
270
271
272
273
self.disconnect("foo")
lib/matplotlib/tests/test_image.py
@@ -1461,6 +1461,6 @@ def test_str_norms(fig_test, fig_ref):
1461
axrs[3].imshow(t,norm=colors.SymLogNorm(linthresh=2,vmin=.3,vmax=.7))
1462
axrs[4].imshow(t,norm="logit",clim=(.3,.7))
1463
1464
-asserttype(axts[0].images[0].norm)==colors.LogNorm# Exactly that class
+asserttype(axts[0].images[0].norm)iscolors.LogNorm# Exactly that class
1465
withpytest.raises(ValueError):
1466
axts[0].imshow(t,norm="foobar")
lib/matplotlib/tests/test_scale.py
@@ -37,22 +37,22 @@ def test_symlog_mask_nan():
37
x=np.arange(-1.5,5,0.5)
38
out=slti.transform_non_affine(slt.transform_non_affine(x))
39
assert_allclose(out,x)
40
-asserttype(out)==type(x)
+asserttype(out)istype(x)
41
42
x[4]=np.nan
43
44
45
46
47
x=np.ma.array(x)
48
49
50
51
52
x[3]=np.ma.masked
53
54
55
56
57
58
@image_comparison(['logit_scales.png'],remove_text=True)