File tree 1 file changed +2
-5
lines changed
lib/matplotlib/projections 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -264,10 +264,7 @@ def transform_non_affine(self, ll):
264
264
cos_latitude = np .cos (latitude )
265
265
266
266
alpha = np .arccos (cos_latitude * np .cos (half_long ))
267
- # Avoid divide-by-zero errors using same method as NumPy.
268
- alpha [alpha == 0.0 ] = 1e-20
269
- # We want unnormalized sinc. numpy.sinc gives us normalized
270
- sinc_alpha = np .sin (alpha ) / alpha
267
+ sinc_alpha = np .sinc (alpha / np .pi ) # np.sinc is sin(pi*x)/(pi*x).
271
268
272
269
x = (cos_latitude * np .sin (half_long )) / sinc_alpha
273
270
y = np .sin (latitude ) / sinc_alpha
@@ -282,7 +279,7 @@ class InvertedAitoffTransform(_GeoTransform):
282
279
def transform_non_affine (self , xy ):
283
280
# docstring inherited
284
281
# MGDTODO: Math is hard ;(
285
- return xy
282
+ return np . full_like ( xy , np . nan )
286
283
287
284
def inverted (self ):
288
285
# docstring inherited
You can’t perform that action at this time.
0 commit comments