NumPyを使って最小-最大正規化を行うPython関数です。入力配列と、正規化のための最小値と最大値（オプション）を受け取ります。この関数は、入力配列が空の場合や、指定された最小値と最大値が等しい場合などのエッジケースを処理します。

```python
import numpy as np

def min_max_normalization(arr, provided_min=None, provided_max=None):
    if len(arr) == 0:
        raise ValueError("Input array cannot be empty.")
    
    arr = np.array(arr)
    
    if provided_min is not None and provided_max is not None:
        if provided_min == provided_max:
            raise ValueError("Provided minimum and maximum values cannot be equal.")
        min_value, max_value = provided_min, provided_max
    else:
        min_value, max_value = np.min(arr), np.max(arr)

    if min_value == max_value:
        raise ValueError("Input array must have at least two distinct values.")
    
    normalized_arr = (arr - min_value) / (max_value - min_value)
    return normalized_arr

# Example usage:
arr = [2, 4, 6, 8, 10]
normalized_arr = min_max_normalization(arr)
print(normalized_arr)

# With provided min and max values:
normalized_arr2 = min_max_normalization(arr, provided_min=0, provided_max=12)
print(normalized_arr2)
```

この関数は、入力配列とオプションの最小値と最大値を受付けます。最小値と最大値が与えられない場合は，入力配列から計算される．そして、指定された、あるいは計算された最小値と最大値を用いて最小-最大正規化を行います。
Here's a Python function that performs min-max normalization using NumPy. It takes an input array, and optional minimum and maximum values for normalization. The function handles edge cases such as when the input array is empty or when the provided minimum and maximum values are equal.

```python
import numpy as np

def min_max_normalization(arr, provided_min=None, provided_max=None):
    if len(arr) == 0:
        raise ValueError("Input array cannot be empty.")
    
    arr = np.array(arr)
    
    if provided_min is not None and provided_max is not None:
        if provided_min == provided_max:
            raise ValueError("Provided minimum and maximum values cannot be equal.")
        min_value, max_value = provided_min, provided_max
    else:
        min_value, max_value = np.min(arr), np.max(arr)

    if min_value == max_value:
        raise ValueError("Input array must have at least two distinct values.")
    
    normalized_arr = (arr - min_value) / (max_value - min_value)
    return normalized_arr

# Example usage:
arr = [2, 4, 6, 8, 10]
normalized_arr = min_max_normalization(arr)
print(normalized_arr)

# With provided min and max values:
normalized_arr2 = min_max_normalization(arr, provided_min=0, provided_max=12)
print(normalized_arr2)
```

This function takes an input array and optional minimum and maximum values. If the minimum and maximum values are not provided, it calculates them from the input array. Then, it performs min-max normalization using the specified or calculated minimum and maximum values.