Describe the bug
|
pos = coordinates * np.array(m_per_deg_lat, m_per_deg_lon) |
has a bug where longitude gets passed as a second arg to
np.array. The second arg for
np.array is the dtype however.
pos = coordinates * np.array(m_per_deg_lat, m_per_deg_lon)
What will happen with the current implementation is that m_per_deg_lat will be silently used as a multiplier for both axes.
# resulting broadcast
lat * m_per_deg_lat
lon * m_per_deg_lat # <- this is wrong. it should be using the lon instead
Expected behavior
Correct implementation is as follows:
pos = coordinates * np.array([m_per_deg_lat, m_per_deg_lon])
This could also affect the unit tests, but I didn't check.