Skip to content
Snippets Groups Projects
Commit 7f3f61d2 authored by Julius Steiglechner's avatar Julius Steiglechner
Browse files

Review.

parent 0e4ddbae
No related branches found
No related tags found
No related merge requests found
"""This module provides functionality to correct and unify images."""
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Mar 12 00:56:39 2024
@author: jsteiglechner
This module provides functionality to correct and unify images.
"""
import numpy as np
def clean_up_image(image: np.ndarray) -> np.ndarray:
"""Clean an image by removing infinite numbers and unnecessary dimensions.
"""
Clean an image by removing infinite numbers and unnecessary dimensions.
Parameters
----------
image : np.ndarray
an image.
Args:
image (np.ndarray): an image
Returns
-------
np.ndarray
cleaned image.
Returns:
np.ndarray: cleaned image
"""
return np.nan_to_num(np.squeeze(image))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment