Skip to content

Commit

Permalink
Merge pull request #439 from lsst/tickets/SP-1906
Browse files Browse the repository at this point in the history
SP-1906: backwards compatibility with numpy 1.
  • Loading branch information
rhiannonlynne authored Feb 3, 2025
2 parents ab59ca0 + 01322f1 commit f2240e5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion rubin_sim/maf/metrics/base_metric.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def __init__(
):
# Turn cols into numpy array so we know
# we can iterate over the columns.
self.col_name_arr = np.array(col, copy=None, ndmin=1)
self.col_name_arr = np.array(col, copy=True, ndmin=1)
# To support simple metrics operating on a single column,
# set self.colname
if len(self.col_name_arr) == 1:
Expand Down
8 changes: 4 additions & 4 deletions rubin_sim/maf/plots/skyproj_plotters.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,15 +335,15 @@ def __call__(self, metric_values, slicer, user_plot_dict, fig=None):
# or specified as decorators.
if self.plot_dict["xlabel"] is None:
if "xlabel" not in self.plot_dict["decorations"]:
self.skyproj.set_xlabel("", visible=False)
self.skyproj.ax.set_xlabel("", visible=False)
else:
self.skyproj.set_xlabel(self.plot_dict["xlabel"])
self.skyproj.ax.set_xlabel(self.plot_dict["xlabel"])

if self.plot_dict["ylabel"] is None:
if "ylabel" not in self.plot_dict["decorations"]:
self.skyproj.set_ylabel("", visible=False)
self.skyproj.ax.set_ylabel("", visible=False)
else:
self.skyproj.set_ylabel(self.plot_dict["ylabel"])
self.skyproj.ax.set_ylabel(self.plot_dict["ylabel"])

if self.plot_dict["label"] is not None:
label_kwargs = {}
Expand Down

0 comments on commit f2240e5

Please sign in to comment.