Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e8f1ed7

Browse files
committed
Clarify why we filter warnings in angle_helper.py
1 parent 80bf9f6 commit e8f1ed7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/mpl_toolkits/axisartist/angle_helper.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,11 @@ def __call__(self, transform_xy, x1, y1, x2, y2):
385385
lon, lat = transform_xy(np.ravel(x), np.ravel(y))
386386

387387
# iron out jumps, but algorithm should be improved.
388-
# Tis is just naive way of doing and my fail for some cases.
388+
# This is just naive way of doing and my fail for some cases.
389+
# Consider replacing this with numpy.unwrap
390+
# We are ignoring invalid warnings. They are triggered when
391+
# comparing arrays with NaNs using > We are already handling
392+
# that correctly using np.nanmin and np.nanmax
389393
with np.errstate(invalid='ignore'):
390394
if self.lon_cycle is not None:
391395
lon0 = np.nanmin(lon)

0 commit comments

Comments
 (0)