Mercurial > hg > nsaunier > traffic-intelligence
diff trafficintelligence/moving.py @ 1287:76f5693b530c
updated tests for numpy 2
| author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
|---|---|
| date | Sat, 20 Jul 2024 20:35:21 -0400 |
| parents | 77a310e29233 |
| children | 86122f5fe500 |
line wrap: on
line diff
--- a/trafficintelligence/moving.py Wed Jul 17 12:28:01 2024 -0400 +++ b/trafficintelligence/moving.py Sat Jul 20 20:35:21 2024 -0400 @@ -4,7 +4,7 @@ import copy from math import sqrt, atan2, cos, sin, inf -from numpy import median, mean, array, arange, zeros, ones, hypot, NaN, std, floor, ceil, float32, argwhere, flatnonzero, minimum, issubdtype, integer as npinteger, percentile, quantile, full +from numpy import median, mean, array, arange, zeros, ones, hypot, nan, std, floor, ceil, float32, argwhere, flatnonzero, minimum, issubdtype, integer as npinteger, percentile, quantile, full from matplotlib.pyplot import plot, text, arrow from scipy.spatial.distance import cdist from scipy.signal import savgol_filter @@ -1667,8 +1667,8 @@ instants.append(t) coords.append(p[0]) else: - instants.append(NaN) - coords.append(NaN) + instants.append(nan) + coords.append(nan) plot(instants, coords, options, **kwargs) if withOrigin and len(instants)>0: plot([instants[0]], [coords[0]], 'ro', **kwargs)
