Library: scipy==1.11.2 (Python 3.10, released 2023-08)

Problem: 
Complete  the function that applies a minimum filter on batched images (batched in the first dimention), non specified parameters should use the default value

Starting code:
from scipy.ndimage import minimum_filter
import numpy as np 
def apply_minimum_filter(A: np.ndarray, size: int) -> np.ndarray:
    

Solution:

    return minimum_filter(A,size=size,axes=[1,2])

Test:

A = np.array([[[7.81411439e-01, 1.12331105e-02, 9.39679607e-01, 6.42515536e-01,
         6.95548884e-01],
        [4.58001321e-01, 7.90049557e-01, 7.41113873e-01, 9.85894466e-03,
         4.53976568e-01],
        [2.24634401e-01, 4.26973301e-01, 8.91014236e-01, 8.23895514e-01,
         9.31046059e-01],
        [4.45855698e-02, 2.58723740e-02, 3.84879860e-01, 5.52190839e-01,
         8.30264909e-02],
        [9.15445530e-01, 8.36618255e-02, 4.39455188e-01, 1.53462390e-01,
         7.26436401e-01]],

       [[7.28031138e-01, 3.75117422e-01, 5.42310487e-01, 5.63557751e-01,
         2.57909701e-04],
        [7.50931873e-01, 6.15538706e-01, 9.05514875e-01, 8.48424138e-01,
         3.10902901e-01],
        [1.72613108e-01, 7.06317645e-01, 8.89355115e-01, 8.90701413e-02,
         9.28579120e-01],
        [9.80044173e-01, 1.67306937e-01, 1.69314197e-01, 5.09876755e-01,
         7.74652232e-01],
        [5.31016205e-01, 6.71446481e-01, 8.29882594e-02, 1.70589945e-01,
         3.23593050e-01]],

       [[8.38046468e-01, 7.96708042e-03, 9.28662972e-01, 6.75111182e-01,
         3.33247539e-02],
        [9.99455965e-01, 9.41123427e-01, 1.06977786e-01, 1.73786082e-01,
         5.95914076e-01],
        [5.46093501e-01, 4.99303483e-01, 4.60402210e-01, 4.75650259e-02,
         4.58097639e-01],
        [5.15319589e-01, 2.31310779e-01, 1.93670305e-01, 9.76320068e-01,
         8.78819966e-01],
        [1.09356481e-01, 2.16028113e-01, 1.67111833e-01, 9.65726787e-01,
         6.75017369e-01]]])
size=3
output = apply_minimum_filter(A,size=size)
expect = np.array([
    [
        [1.12331105e-02, 1.12331105e-02, 9.85894466e-03, 9.85894466e-03, 9.85894466e-03],
        [1.12331105e-02, 1.12331105e-02, 9.85894466e-03, 9.85894466e-03, 9.85894466e-03],
        [2.58723740e-02, 2.58723740e-02, 9.85894466e-03, 9.85894466e-03, 9.85894466e-03],
        [2.58723740e-02, 2.58723740e-02, 2.58723740e-02, 8.30264909e-02, 8.30264909e-02],
        [2.58723740e-02, 2.58723740e-02, 2.58723740e-02, 8.30264909e-02, 8.30264909e-02]
    ],
    [
        [3.75117422e-01, 3.75117422e-01, 3.75117422e-01, 2.57909701e-04, 2.57909701e-04],
        [1.72613108e-01, 1.72613108e-01, 8.90701413e-02, 2.57909701e-04, 2.57909701e-04],
        [1.67306937e-01, 1.67306937e-01, 8.90701413e-02, 8.90701413e-02, 8.90701413e-02],
        [1.67306937e-01, 8.29882594e-02, 8.29882594e-02, 8.29882594e-02, 8.90701413e-02],
        [1.67306937e-01, 8.29882594e-02, 8.29882594e-02, 8.29882594e-02, 1.70589945e-01]
    ],
    [
        [7.96708042e-03, 7.96708042e-03, 7.96708042e-03, 3.33247539e-02, 3.33247539e-02],
        [7.96708042e-03, 7.96708042e-03, 7.96708042e-03, 3.33247539e-02, 3.33247539e-02],
        [2.31310779e-01, 1.06977786e-01, 4.75650259e-02, 4.75650259e-02, 4.75650259e-02],
        [1.09356481e-01, 1.09356481e-01, 4.75650259e-02, 4.75650259e-02, 4.75650259e-02],
        [1.09356481e-01, 1.09356481e-01, 1.67111833e-01, 1.67111833e-01, 6.75017369e-01]
    ]
])
assertion_value = np.allclose(output, expect)
assert assertion_value