From 1672233806a98dc02b484a70484809ca64c6acf2 Mon Sep 17 00:00:00 2001 From: Jean Connelly Date: Thu, 10 Mar 2022 11:49:55 -0500 Subject: [PATCH] Remove deprecatd np.int and np.float --- make_timeline.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/make_timeline.py b/make_timeline.py index 3031dbf..fb18092 100755 --- a/make_timeline.py +++ b/make_timeline.py @@ -288,7 +288,7 @@ def plot_multi_line(x, y, z, bins, colors, ax): # Allow specifying bin centers, not edges if len(bins) == len(colors): - bins = np.array(bins, dtype=np.float) + bins = np.array(bins, dtype=float) bins = np.concatenate([[z.min() - 1], (bins[1:] + bins[:-1]) / 2.0, [z.max() + 1]]) @@ -390,7 +390,7 @@ def main(): # Make a z-valued curve where the z value corresponds to the grating state. x = cxc2pd(fluence_times) y = fluence - z = np.zeros(len(fluence_times), dtype=np.int) + z = np.zeros(len(fluence_times), dtype=int) for state in states: ok = ((state['tstart'] < fluence_times) @@ -524,7 +524,7 @@ def main(): y_si = -0.23 x = cxc2pd(times) y = np.zeros_like(times) + y_si - z = np.zeros_like(times, dtype=np.float) # 0 => ACIS + z = np.zeros_like(times, dtype=float) # 0 => ACIS z[state_vals['simpos'] < 0] = 1.0 # HRC plot_multi_line(x, y, z, [0, 1], ['c', 'r'], ax) dx = (x1 - x0) * 0.01