Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
ax.set_aspect triggers useless warnings #9976
ax.set_aspect triggers a seemingly useless warning when its argument is a numpy.float64:
Code for reproduction
import numpy as np import matplotlib.pyplot as plt fig, ax = plt.subplots() ax.plot(,) ax.set_aspect(float(1)) # this is fine ax.set_aspect(np.float64(1)) # triggers warnings
I see little reason to treat differently float and numpy float and these warnings seem useless. Note that the actual result is fine.
The warnings appear for python 2.7 and matplotlib 2, I tested with