File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
lib/matplotlib/projections Expand file tree Collapse file tree 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):
264264 cos_latitude = np .cos (latitude )
265265
266266 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).
271268
272269 x = (cos_latitude * np .sin (half_long )) / sinc_alpha
273270 y = np .sin (latitude ) / sinc_alpha
@@ -282,7 +279,7 @@ class InvertedAitoffTransform(_GeoTransform):
282279 def transform_non_affine (self , xy ):
283280 # docstring inherited
284281 # MGDTODO: Math is hard ;(
285- return xy
282+ return np . full_like ( xy , np . nan )
286283
287284 def inverted (self ):
288285 # docstring inherited
You can’t perform that action at this time.
0 commit comments