Removed deprecated np.float

numpy 1.20 deprecates np.float, which was only ever an alias for
``float``.  I've replaced all occurrences of np.float with float, as
recommended.  There should be no change in functionality.
This commit is contained in:
Richard Bowman 2021-03-30 17:40:19 +01:00
parent 17b19d7dfd
commit cd5e32b843
4 changed files with 16 additions and 16 deletions

View file

@ -106,7 +106,7 @@ def lst_from_channels(channels: np.ndarray) -> np.ndarray:
logging.info("Generating a lens shading table at %sx%s", *lst_resolution)
lens_shading: np.ndarray = np.zeros(
[channels.shape[0]] + lst_resolution, dtype=np.float
[channels.shape[0]] + lst_resolution, dtype=float
)
for i in range(lens_shading.shape[0]):
image_channel: np.ndarray = channels[i, :, :]
@ -193,7 +193,7 @@ def recalibrate_camera(camera: PiCamera):
_ = rgb_image(camera)
# Fix the AWB gains so the image is neutral
channel_means = np.mean(np.mean(rgb_image(camera), axis=0, dtype=np.float), axis=0)
channel_means = np.mean(np.mean(rgb_image(camera), axis=0, dtype=float), axis=0)
old_gains = camera.awb_gains
camera.awb_gains = (
channel_means[1] / channel_means[0] * old_gains[0],