Skip to content

Commit cb1a149

Browse files
committed
make flex for numpy or pandas
1 parent 176dd99 commit cb1a149

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

ogcore/output_plots.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -838,7 +838,9 @@ def ss_profiles(
838838
if var != "n":
839839
# If not labor, normalize so data and model match in
840840
# first period
841-
plot_data = plot_data / plot_data.values[0] * base_var[0]
841+
plot_data_arr = np.asarray(plot_data)
842+
if plot_data_arr[0] != 0:
843+
plot_data = plot_data_arr / plot_data_arr[0] * base_var[0]
842844
plt.plot(
843845
age_vec, plot_data, linewidth=2.0, label="Data", linestyle=":"
844846
)

0 commit comments

Comments
 (0)