diff --git a/ctapipe/instrument/camera/geometry.py b/ctapipe/instrument/camera/geometry.py index dd55b14425b..50c227db619 100644 --- a/ctapipe/instrument/camera/geometry.py +++ b/ctapipe/instrument/camera/geometry.py @@ -800,7 +800,7 @@ def pixel_moment_matrix(self): x = self.pix_x.value y = self.pix_y.value - return np.row_stack( + return np.vstack( [ x, y, diff --git a/ctapipe/instrument/camera/image_conversion.py b/ctapipe/instrument/camera/image_conversion.py index c4131a77cc5..759375449ca 100644 --- a/ctapipe/instrument/camera/image_conversion.py +++ b/ctapipe/instrument/camera/image_conversion.py @@ -1,6 +1,5 @@ -import numpy as np import astropy.units as u - +import numpy as np __all__ = [ "unskew_hex_pixel_grid", @@ -294,8 +293,8 @@ def get_orthogonal_grid_edges(pix_x, pix_y, scale_aspect=True): # with the maximal extension of the axes and the size of the pixels, # determine the number of bins in each direction - n_bins_x = int(np.round_(np.abs(np.max(pix_x) - np.min(pix_x)) / d_x) + 2) - n_bins_y = int(np.round_(np.abs(np.max(pix_y) - np.min(pix_y)) / d_y) + 2) + n_bins_x = int(np.round(np.abs(np.max(pix_x) - np.min(pix_x)) / d_x) + 2) + n_bins_y = int(np.round(np.abs(np.max(pix_y) - np.min(pix_y)) / d_y) + 2) x_edges = np.linspace(pix_x.min(), pix_x.max(), n_bins_x) y_edges = np.linspace(pix_y.min(), pix_y.max(), n_bins_y) diff --git a/docs/changes/2406.maintenance.rst b/docs/changes/2406.maintenance.rst new file mode 100644 index 00000000000..2d4cf50ceac --- /dev/null +++ b/docs/changes/2406.maintenance.rst @@ -0,0 +1 @@ +Updated some numpy calls to not use depreciated functions.