Skip to content

Commit

Permalink
Fix/numpy (#150)
Browse files Browse the repository at this point in the history
* replace np.round_ with np.round

* replace numpy.round_ with numpy.round
  • Loading branch information
FariborzDaneshvar-NOAA authored Aug 7, 2024
1 parent 2d08625 commit 7b37332
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions ensembleperturbation/plotting/surrogate.py
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ def plot_selected_validations(
validation['y'].max(),
]
)
vmax = numpy.round_(validation.sel(source='model').results.quantile(0.98), decimals=1)
vmax = numpy.round(validation.sel(source='model').results.quantile(0.98), decimals=1)
vmin = 0.0
for run in run_list:
figure = pyplot.figure()
Expand Down Expand Up @@ -476,7 +476,7 @@ def plot_selected_percentiles(
node_percentiles['y'].max(),
]
)
vmax = numpy.round_(percentiles.sel(source='model').quantile(0.98), decimals=1)
vmax = numpy.round(percentiles.sel(source='model').quantile(0.98), decimals=1)
vmin = 0.0
for perc in perc_list:
figure = pyplot.figure()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,8 @@ def karhunen_loeve_prediction(
actual_values['y'].max(),
]
)
vmax = np.round_(actual_values.quantile(0.98), decimals=1)
vmin = min(0.0, np.round_(actual_values.quantile(0.02), decimals=1))
vmax = np.round(actual_values.quantile(0.98), decimals=1)
vmin = min(0.0, np.round(actual_values.quantile(0.02), decimals=1))
sources = {'actual': actual_values, 'reconstructed': kl_prediction}
map_crs = cartopy.crs.PlateCarree()
for example in ensembles_to_plot:
Expand Down

0 comments on commit 7b37332

Please sign in to comment.