⚠️ CI failed on Linux_Docker.debian_atlas_32bit (last failure: Sep 03, 2024) ⚠️

**CI is still failing on [Linux_Docker.debian_atlas_32bit](https://dev.azure.com/scikit-learn/scikit-learn/_build/results?buildId=69809&view=logs&j=aabdcdc3-bb64-5414-b357-ed024fe8659e)** (Sep 03, 2024)
- test_spectral_clustering_with_arpack_amg_solvers
- test_img_to_graph
- test_imputation_mean_median[csc_matrix]
- test_imputation_mean_median[csc_array]
- test_robust_scale_axis1

COMMENT:
The debian32 build has started to fail from time to time recently (also seen on PRs e.g. https://github.com/scikit-learn/scikit-learn/pull/29765, https://github.com/scikit-learn/scikit-learn/pull/29759 and https://github.com/scikit-learn/scikit-learn/pull/29724). No clue about the underlying reason and I did not manage to reproduce it inside a `i386/debian:12` Docker image.

```
FAILED cluster/tests/test_spectral.py::test_spectral_clustering_with_arpack_amg_solvers
FAILED feature_extraction/tests/test_image.py::test_img_to_graph - IndexError...
FAILED impute/tests/test_impute.py::test_imputation_mean_median[csc_matrix]
FAILED impute/tests/test_impute.py::test_imputation_mean_median[csc_array] - ...
FAILED preprocessing/tests/test_data.py::test_robust_scale_axis1 - IndexError...
```

<details>
<summary>More details from <a href="https://dev.azure.com/scikit-learn/scikit-learn/_build/results?buildId=69771&view=logs&j=aabdcdc3-bb64-5414-b357-ed024fe8659e&t=b7b3ba55-d585-563b-a032-f235636c22b0">build log</a></summary>

```
_______________ test_spectral_clustering_with_arpack_amg_solvers _______________

    def test_spectral_clustering_with_arpack_amg_solvers():
        # Test that spectral_clustering is the same for arpack and amg solver
        # Based on toy example from plot_segmentation_toy.py
    
        # a small two coin image
        x, y = np.indices((40, 40))
    
        center1, center2 = (14, 12), (20, 25)
        radius1, radius2 = 8, 7
    
        circle1 = (x - center1[0]) ** 2 + (y - center1[1]) ** 2 < radius1**2
        circle2 = (x - center2[0]) ** 2 + (y - center2[1]) ** 2 < radius2**2
    
        circles = circle1 | circle2
        mask = circles.copy()
        img = circles.astype(float)
    
>       graph = img_to_graph(img, mask=mask)

center1    = (14, 12)
center2    = (20, 25)
circle1    = array([[False, False, False, ..., False, False, False],
       [False, False, False, ..., False, False, False],
      ...alse],
       [False, False, False, ..., False, False, False],
       [False, False, False, ..., False, False, False]])
circle2    = array([[False, False, False, ..., False, False, False],
       [False, False, False, ..., False, False, False],
      ...alse],
       [False, False, False, ..., False, False, False],
       [False, False, False, ..., False, False, False]])
circles    = array([[False, False, False, ..., False, False, False],
       [False, False, False, ..., False, False, False],
      ...alse],
       [False, False, False, ..., False, False, False],
       [False, False, False, ..., False, False, False]])
img        = array([[0., 0., 0., ..., 0., 0., 0.],
       [0., 0., 0., ..., 0., 0., 0.],
       [0., 0., 0., ..., 0., 0., 0.],
       ...,
       [0., 0., 0., ..., 0., 0., 0.],
       [0., 0., 0., ..., 0., 0., 0.],
       [0., 0., 0., ..., 0., 0., 0.]])
mask       = array([[False, False, False, ..., False, False, False],
       [False, False, False, ..., False, False, False],
      ...alse],
       [False, False, False, ..., False, False, False],
       [False, False, False, ..., False, False, False]])
radius1    = 8
radius2    = 7
x          = array([[ 0,  0,  0, ...,  0,  0,  0],
       [ 1,  1,  1, ...,  1,  1,  1],
       [ 2,  2,  2, ...,  2,  2,  2],
       ...,
       [37, 37, 37, ..., 37, 37, 37],
       [38, 38, 38, ..., 38, 38, 38],
       [39, 39, 39, ..., 39, 39, 39]])
y          = array([[ 0,  1,  2, ..., 37, 38, 39],
       [ 0,  1,  2, ..., 37, 38, 39],
       [ 0,  1,  2, ..., 37, 38, 39],
       ...,
       [ 0,  1,  2, ..., 37, 38, 39],
       [ 0,  1,  2, ..., 37, 38, 39],
       [ 0,  1,  2, ..., 37, 38, 39]])

/io/sklearn/cluster/tests/test_spectral.py:235: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/io/sklearn/utils/_param_validation.py:216: in wrapper
    return func(*args, **kwargs)
        args       = (array([[0., 0., 0., ..., 0., 0., 0.],
       [0., 0., 0., ..., 0., 0., 0.],
       [0., 0., 0., ..., 0., 0., 0.],
   ....,
       [0., 0., 0., ..., 0., 0., 0.],
       [0., 0., 0., ..., 0., 0., 0.],
       [0., 0., 0., ..., 0., 0., 0.]]),)
        func       = <function img_to_graph at 0xedb71758>
        func_sig   = <Signature (img, *, mask=None, return_as=<class 'scipy.sparse._coo.coo_matrix'>, dtype=None)>
        global_skip_validation = False
        kwargs     = {'mask': array([[False, False, False, ..., False, False, False],
       [False, False, False, ..., False, False, False...lse],
       [False, False, False, ..., False, False, False],
       [False, False, False, ..., False, False, False]])}
        parameter_constraints = {'dtype': 'no_validation', 'img': ['array-like'], 'mask': [None, <class 'numpy.ndarray'>], 'return_as': [<class 'type'>]}
        params     = {'dtype': None, 'img': array([[0., 0., 0., ..., 0., 0., 0.],
       [0., 0., 0., ..., 0., 0., 0.],
       [0., 0., 0.,... False],
       [False, False, False, ..., False, False, False]]), 'return_as': <class 'scipy.sparse._coo.coo_matrix'>}
        prefer_skip_nested_validation = True
        to_ignore  = ['self', 'cls']
/io/sklearn/feature_extraction/image.py:185: in img_to_graph
    return _to_graph(n_x, n_y, n_z, mask, img, return_as, dtype)
        dtype      = None
        img        = array([[[0.],
        [0.],
        [0.],
        ...,
        [0.],
        [0.],
        [0.]],

       [[0.],
     ...0.],
        [0.]],

       [[0.],
        [0.],
        [0.],
        ...,
        [0.],
        [0.],
        [0.]]])
        mask       = array([[False, False, False, ..., False, False, False],
       [False, False, False, ..., False, False, False],
      ...alse],
       [False, False, False, ..., False, False, False],
       [False, False, False, ..., False, False, False]])
        n_x        = 40
        n_y        = 40
        n_z        = 1
        return_as  = <class 'scipy.sparse._coo.coo_matrix'>
/io/sklearn/feature_extraction/image.py:103: in _to_graph
    weights = _compute_gradient_3d(edges, img)
        dtype      = dtype('float64')
        edges      = array([[   0,    1,    2, ..., 1557, 1558, 1559],
       [   1,    2,    3, ..., 1597, 1598, 1599]])
        img        = array([[[0.],
        [0.],
        [0.],
        ...,
        [0.],
        [0.],
        [0.]],

       [[0.],
     ...0.],
        [0.]],

       [[0.],
        [0.],
        [0.],
        ...,
        [0.],
        [0.],
        [0.]]])
        mask       = array([[False, False, False, ..., False, False, False],
       [False, False, False, ..., False, False, False],
      ...alse],
       [False, False, False, ..., False, False, False],
       [False, False, False, ..., False, False, False]])
        n_x        = 40
        n_y        = 40
        n_z        = 1
        return_as  = <class 'scipy.sparse._coo.coo_matrix'>
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

edges = array([[   0,    1,    2, ..., 1557, 1558, 1559],
       [   1,    2,    3, ..., 1597, 1598, 1599]])
img = array([[[0.],
        [0.],
        [0.],
        ...,
        [0.],
        [0.],
        [0.]],

       [[0.],
     ...0.],
        [0.]],

       [[0.],
        [0.],
        [0.],
        ...,
        [0.],
        [0.],
        [0.]]])

    def _compute_gradient_3d(edges, img):
        _, n_y, n_z = img.shape
        gradient = np.abs(
>           img[
                edges[0] // (n_y * n_z),
                (edges[0] % (n_y * n_z)) // n_z,
                (edges[0] % (n_y * n_z)) % n_z,
            ]
            - img[
                edges[1] // (n_y * n_z),
                (edges[1] % (n_y * n_z)) // n_z,
                (edges[1] % (n_y * n_z)) % n_z,
            ]
        )
E       IndexError: index 40 is out of bounds for axis 0 with size 40

_          = 40
edges      = array([[   0,    1,    2, ..., 1557, 1558, 1559],
       [   1,    2,    3, ..., 1597, 1598, 1599]])
img        = array([[[0.],
        [0.],
        [0.],
        ...,
        [0.],
        [0.],
        [0.]],

       [[0.],
     ...0.],
        [0.]],

       [[0.],
        [0.],
        [0.],
        ...,
        [0.],
        [0.],
        [0.]]])
n_y        = 40
n_z        = 1

/io/sklearn/feature_extraction/image.py:52: IndexError
______________________________ test_img_to_graph _______________________________

    def test_img_to_graph():
        x, y = np.mgrid[:4, :4] - 10
>       grad_x = img_to_graph(x)

x          = array([[-10, -10, -10, -10],
       [ -9,  -9,  -9,  -9],
       [ -8,  -8,  -8,  -8],
       [ -7,  -7,  -7,  -7]])
y          = array([[-10,  -9,  -8,  -7],
       [-10,  -9,  -8,  -7],
       [-10,  -9,  -8,  -7],
       [-10,  -9,  -8,  -7]])

/io/sklearn/feature_extraction/tests/test_image.py:21: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/io/sklearn/utils/_param_validation.py:216: in wrapper
    return func(*args, **kwargs)
        args       = (array([[-10, -10, -10, -10],
       [ -9,  -9,  -9,  -9],
       [ -8,  -8,  -8,  -8],
       [ -7,  -7,  -7,  -7]]),)
        func       = <function img_to_graph at 0xedb71758>
        func_sig   = <Signature (img, *, mask=None, return_as=<class 'scipy.sparse._coo.coo_matrix'>, dtype=None)>
        global_skip_validation = False
        kwargs     = {}
        parameter_constraints = {'dtype': 'no_validation', 'img': ['array-like'], 'mask': [None, <class 'numpy.ndarray'>], 'return_as': [<class 'type'>]}
        params     = {'dtype': None, 'img': array([[-10, -10, -10, -10],
       [ -9,  -9,  -9,  -9],
       [ -8,  -8,  -8,  -8],
       [ -7,  -7,  -7,  -7]]), 'mask': None, 'return_as': <class 'scipy.sparse._coo.coo_matrix'>}
        prefer_skip_nested_validation = True
        to_ignore  = ['self', 'cls']
/io/sklearn/feature_extraction/image.py:185: in img_to_graph
    return _to_graph(n_x, n_y, n_z, mask, img, return_as, dtype)
        dtype      = None
        img        = array([[[-10],
        [-10],
        [-10],
        [-10]],

       [[ -9],
        [ -9],
        [ -9],
        [ -...   [[ -8],
        [ -8],
        [ -8],
        [ -8]],

       [[ -7],
        [ -7],
        [ -7],
        [ -7]]])
        mask       = None
        n_x        = 4
        n_y        = 4
        n_z        = 1
        return_as  = <class 'scipy.sparse._coo.coo_matrix'>
/io/sklearn/feature_extraction/image.py:103: in _to_graph
    weights = _compute_gradient_3d(edges, img)
        dtype      = dtype('int32')
        edges      = array([[ 0,  1,  2,  4,  5,  6,  8,  9, 10, 12, 13, 14,  0,  1,  2,  3,
         4,  5,  6,  7,  8,  9, 10, 11],
       [ 1,  2,  3,  5,  6,  7,  9, 10, 11, 13, 14, 15,  4,  5,  6,  7,
         8,  9, 10, 11, 12, 13, 14, 15]])
        img        = array([[[-10],
        [-10],
        [-10],
        [-10]],

       [[ -9],
        [ -9],
        [ -9],
        [ -...   [[ -8],
        [ -8],
        [ -8],
        [ -8]],

       [[ -7],
        [ -7],
        [ -7],
        [ -7]]])
        mask       = None
        n_x        = 4
        n_y        = 4
        n_z        = 1
        return_as  = <class 'scipy.sparse._coo.coo_matrix'>
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

edges = array([[ 0,  1,  2,  4,  5,  6,  8,  9, 10, 12, 13, 14,  0,  1,  2,  3,
         4,  5,  6,  7,  8,  9, 10, 11],
       [ 1,  2,  3,  5,  6,  7,  9, 10, 11, 13, 14, 15,  4,  5,  6,  7,
         8,  9, 10, 11, 12, 13, 14, 15]])
img = array([[[-10],
        [-10],
        [-10],
        [-10]],

       [[ -9],
        [ -9],
        [ -9],
        [ -...   [[ -8],
        [ -8],
        [ -8],
        [ -8]],

       [[ -7],
        [ -7],
        [ -7],
        [ -7]]])

    def _compute_gradient_3d(edges, img):
        _, n_y, n_z = img.shape
        gradient = np.abs(
>           img[
                edges[0] // (n_y * n_z),
                (edges[0] % (n_y * n_z)) // n_z,
                (edges[0] % (n_y * n_z)) % n_z,
            ]
            - img[
                edges[1] // (n_y * n_z),
                (edges[1] % (n_y * n_z)) // n_z,
                (edges[1] % (n_y * n_z)) % n_z,
            ]
        )
E       IndexError: index 4 is out of bounds for axis 0 with size 4

_          = 4
edges      = array([[ 0,  1,  2,  4,  5,  6,  8,  9, 10, 12, 13, 14,  0,  1,  2,  3,
         4,  5,  6,  7,  8,  9, 10, 11],
       [ 1,  2,  3,  5,  6,  7,  9, 10, 11, 13, 14, 15,  4,  5,  6,  7,
         8,  9, 10, 11, 12, 13, 14, 15]])
img        = array([[[-10],
        [-10],
        [-10],
        [-10]],

       [[ -9],
        [ -9],
        [ -9],
        [ -...   [[ -8],
        [ -8],
        [ -8],
        [ -8]],

       [[ -7],
        [ -7],
        [ -7],
        [ -7]]])
n_y        = 4
n_z        = 1

/io/sklearn/feature_extraction/image.py:52: IndexError
___________________ test_imputation_mean_median[csc_matrix] ____________________

csc_container = <class 'scipy.sparse._csc.csc_matrix'>

    @pytest.mark.parametrize("csc_container", CSC_CONTAINERS)
    def test_imputation_mean_median(csc_container):
        # Test imputation using the mean and median strategies, when
        # missing_values != 0.
        rng = np.random.RandomState(0)
    
        dim = 10
        dec = 10
        shape = (dim * dim, dim + dec)
    
        zeros = np.zeros(shape[0])
        values = np.arange(1, shape[0] + 1)
        values[4::2] = -values[4::2]
    
        tests = [
            ("mean", np.nan, lambda z, v, p: safe_mean(np.hstack((z, v)))),
            ("median", np.nan, lambda z, v, p: safe_median(np.hstack((z, v)))),
        ]
    
        for strategy, test_missing_values, true_value_fun in tests:
            X = np.empty(shape)
            X_true = np.empty(shape)
            true_statistics = np.empty(shape[1])
    
            # Create a matrix X with columns
            #    - with only zeros,
            #    - with only missing values
            #    - with zeros, missing values and values
            # And a matrix X_true containing all true values
            for j in range(shape[1]):
                nb_zeros = (j - dec + 1 > 0) * (j - dec + 1) * (j - dec + 1)
                nb_missing_values = max(shape[0] + dec * dec - (j + dec) * (j + dec), 0)
                nb_values = shape[0] - nb_zeros - nb_missing_values
    
                z = zeros[:nb_zeros]
                p = np.repeat(test_missing_values, nb_missing_values)
                v = values[rng.permutation(len(values))[:nb_values]]
    
                true_statistics[j] = true_value_fun(z, v, p)
    
                # Create the columns
                X[:, j] = np.hstack((v, z, p))
    
                if 0 == test_missing_values:
                    # XXX unreached code as of v0.22
                    X_true[:, j] = np.hstack(
                        (v, np.repeat(true_statistics[j], nb_missing_values + nb_zeros))
                    )
                else:
                    X_true[:, j] = np.hstack(
                        (v, z, np.repeat(true_statistics[j], nb_missing_values))
                    )
    
                # Shuffle them the same way
                np.random.RandomState(j).shuffle(X[:, j])
                np.random.RandomState(j).shuffle(X_true[:, j])
    
            # Mean doesn't support columns containing NaNs, median does
            if strategy == "median":
                cols_to_keep = ~np.isnan(X_true).any(axis=0)
            else:
                cols_to_keep = ~np.isnan(X_true).all(axis=0)
    
            X_true = X_true[:, cols_to_keep]
    
>           _check_statistics(
                X, X_true, strategy, true_statistics, test_missing_values, csc_container
            )

X          = array([[ nan,  nan,  nan, ...,   0.,   0.,   0.],
       [ nan,  nan,  96., ...,  64.,   0.,   0.],
       [ nan,  nan...  2.,   0.,   0.],
       [ nan, -97., -53., ...,  50.,   0.,   0.],
       [ nan,  nan, -29., ...,  86.,   0.,   0.]])
X_true     = array([[ 40., -16.,  10., ...,   0.,   0.,   0.],
       [ 40.,  96.,  48., ...,  64.,   0.,   0.],
       [ 40., -16....  2.,   0.,   0.],
       [-97., -53., -67., ...,  50.,   0.,   0.],
       [ 40., -29.,  44., ...,  86.,   0.,   0.]])
cols_to_keep = array([False,  True,  True,  True,  True,  True,  True,  True,  True,
        True,  True,  True,  True,  True,  True,  True,  True,  True,
        True,  True])
csc_container = <class 'scipy.sparse._csc.csc_matrix'>
dec        = 10
dim        = 10
j          = 19
nb_missing_values = 0
nb_values  = 0
nb_zeros   = 100
p          = array([], dtype=float64)
rng        = RandomState(MT19937) at 0xE20EF628
shape      = (100, 20)
strategy   = 'median'
test_missing_values = nan
tests      = [('mean', nan, <function test_imputation_mean_median.<locals>.<lambda> at 0xe1dbc6b8>), ('median', nan, <function test_imputation_mean_median.<locals>.<lambda> at 0xe1dbc438>)]
true_statistics = array([  nan,  40. , -16. ,  10. ,   3.5,   2.5,   2.5,   2.5,   2.5,
         2.5,   1.5,   0.5,   0. ,   0. ,   0. ,   0. ,   0. ,   0. ,
         0. ,   0. ])
true_value_fun = <function test_imputation_mean_median.<locals>.<lambda> at 0xe1dbc438>
v          = array([], dtype=int32)
values     = array([  1,   2,   3,   4,  -5,   6,  -7,   8,  -9,  10, -11,  12, -13,
        14, -15,  16, -17,  18, -19,  20, -21,...  -79,  80, -81,  82, -83,  84, -85,  86, -87,  88, -89,  90, -91,
        92, -93,  94, -95,  96, -97,  98, -99, 100])
z          = array([0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
       0., 0., 0., 0., 0., 0., 0., 0., 0., ...0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
       0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.])
zeros      = array([0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
       0., 0., 0., 0., 0., 0., 0., 0., 0., ...0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
       0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.])

/io/sklearn/impute/tests/test_impute.py:237: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/io/sklearn/impute/tests/test_impute.py:73: in _check_statistics
    X_trans = imputer.fit(X).transform(X.copy())
        X          = array([[ nan,  nan,  nan, ...,   0.,   0.,   0.],
       [ nan,  nan,  96., ...,  64.,   0.,   0.],
       [ nan,  nan...  2.,   0.,   0.],
       [ nan, -97., -53., ...,  50.,   0.,   0.],
       [ nan,  nan, -29., ...,  86.,   0.,   0.]])
        X_true     = array([[ 40., -16.,  10., ...,   0.,   0.,   0.],
       [ 40.,  96.,  48., ...,  64.,   0.,   0.],
       [ 40., -16....  2.,   0.,   0.],
       [-97., -53., -67., ...,  50.,   0.,   0.],
       [ 40., -29.,  44., ...,  86.,   0.,   0.]])
        assert_ae  = <function assert_array_almost_equal at 0xf3621e88>
        err_msg    = 'Parameters: strategy = median, missing_values = nan, sparse = {0}'
        imputer    = SimpleImputer(strategy='median')
        missing_values = nan
        sparse_container = <class 'scipy.sparse._csc.csc_matrix'>
        statistics = array([  nan,  40. , -16. ,  10. ,   3.5,   2.5,   2.5,   2.5,   2.5,
         2.5,   1.5,   0.5,   0. ,   0. ,   0. ,   0. ,   0. ,   0. ,
         0. ,   0. ])
        strategy   = 'median'
/io/sklearn/base.py:1514: in wrapper
    return fit_method(estimator, *args, **kwargs)
        args       = (array([[ nan,  nan,  nan, ...,   0.,   0.,   0.],
       [ nan,  nan,  96., ...,  64.,   0.,   0.],
       [ nan,  na...2.,   0.,   0.],
       [ nan, -97., -53., ...,  50.,   0.,   0.],
       [ nan,  nan, -29., ...,  86.,   0.,   0.]]),)
        estimator  = SimpleImputer(strategy='median')
        fit_method = <function SimpleImputer.fit at 0xea2e6168>
        global_skip_validation = False
        kwargs     = {}
        partial_fit_and_fitted = False
        prefer_skip_nested_validation = True
/io/sklearn/impute/_base.py:437: in fit
    self.statistics_ = self._dense_fit(
        X          = array([[ nan,  nan,  nan, ...,   0.,   0.,   0.],
       [ nan,  nan,  96., ...,  64.,   0.,   0.],
       [ nan,  nan...  2.,   0.,   0.],
       [ nan, -97., -53., ...,  50.,   0.,   0.],
       [ nan,  nan, -29., ...,  86.,   0.,   0.]])
        fill_value = 0
        self       = SimpleImputer(strategy='median')
        y          = None
/io/sklearn/impute/_base.py:506: in _dense_fit
    median_masked = np.ma.median(masked_X, axis=0)
        X          = array([[ nan,  nan,  nan, ...,   0.,   0.,   0.],
       [ nan,  nan,  96., ...,  64.,   0.,   0.],
       [ nan,  nan...  2.,   0.,   0.],
       [ nan, -97., -53., ...,  50.,   0.,   0.],
       [ nan,  nan, -29., ...,  86.,   0.,   0.]])
        __class__  = <class 'sklearn.impute._base.SimpleImputer'>
        fill_value = 0
        masked_X   = masked_array(
  data=[[--, --, --, ..., 0.0, 0.0, 0.0],
        [--, --, 96.0, ..., 64.0, 0.0, 0.0],
        [--, --, ... False, False, ..., False, False, False],
        [ True,  True, False, ..., False, False, False]],
  fill_value=1e+20)
        missing_mask = array([[ True,  True,  True, ..., False, False, False],
       [ True,  True, False, ..., False, False, False],
      ...alse],
       [ True, False, False, ..., False, False, False],
       [ True,  True, False, ..., False, False, False]])
        missing_values = nan
        self       = SimpleImputer(strategy='median')
        strategy   = 'median'
/usr/lib/python3/dist-packages/numpy/ma/extras.py:735: in median
    return _ureduce(a, func=_median, keepdims=keepdims, axis=axis, out=out,
        a          = masked_array(
  data=[[--, --, --, ..., 0.0, 0.0, 0.0],
        [--, --, 96.0, ..., 64.0, 0.0, 0.0],
        [--, --, ... False, False, ..., False, False, False],
        [ True,  True, False, ..., False, False, False]],
  fill_value=1e+20)
        axis       = 0
        keepdims   = False
        out        = None
        overwrite_input = False
/usr/lib/python3/dist-packages/numpy/lib/function_base.py:3752: in _ureduce
    r = func(a, **kwargs)
        a          = masked_array(
  data=[[--, --, --, ..., 0.0, 0.0, 0.0],
        [--, --, 96.0, ..., 64.0, 0.0, 0.0],
        [--, --, ... False, False, ..., False, False, False],
        [ True,  True, False, ..., False, False, False]],
  fill_value=1e+20)
        axis       = (0,)
        func       = <function _median at 0xf506b618>
        keepdims   = False
        kwargs     = {'axis': 0, 'out': None, 'overwrite_input': False}
        nd         = 2
        out        = None
/usr/lib/python3/dist-packages/numpy/ma/extras.py:798: in _median
    low_high = np.take_along_axis(asorted, lh, axis=axis)
        a          = masked_array(
  data=[[--, --, --, ..., 0.0, 0.0, 0.0],
        [--, --, 96.0, ..., 64.0, 0.0, 0.0],
        [--, --, ... False, False, ..., False, False, False],
        [ True,  True, False, ..., False, False, False]],
  fill_value=1e+20)
        asorted    = masked_array(
  data=[[--, -97.0, -99.0, ..., -99.0, -79.0, 0.0],
        [--, -85.0, -91.0, ..., -91.0, -65.0, 0.0],
...  True,  True, ..., False, False, False],
        [ True,  True,  True, ..., False, False, False]],
  fill_value=1e+20)
        axis       = 0
        counts     = array([[  0,  21,  44,  69,  96, 100, 100, 100, 100, 100, 100, 100, 100,
        100, 100, 100, 100, 100, 100, 100]], dtype=int32)
        fill_value = inf
        h          = array([[  0,  21,  44,  69,  96, 100, 100, 100, 100, 100, 100, 100, 100,
        100, 100, 100,  50,  50,  50,  50]], dtype=int32)
        l          = array([[-1, 21, 43, 69, 95, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99,
        49, 49, 49, 49]])
        lh         = array([[ -1,  21,  43,  69,  95,  99,  99,  99,  99,  99,  99,  99,  99,
         99,  99,  99,  49,  49,  49,  49],
       [  0,  21,  44,  69,  96, 100, 100, 100, 100, 100, 100, 100, 100,
        100, 100, 100,  50,  50,  50,  50]])
        odd        = array([[False,  True, False,  True, False, False, False, False, False,
        False, False, False, False, False, False, False, False, False,
        False, False]])
        out        = None
        overwrite_input = False
<__array_function__ internals>:200: in take_along_axis
    ???
        args       = (masked_array(
  data=[[--, -97.0, -99.0, ..., -99.0, -79.0, 0.0],
        [--, -85.0, -91.0, ..., -91.0, -65.0, 0.0],...
       [  0,  21,  44,  69,  96, 100, 100, 100, 100, 100, 100, 100, 100,
        100, 100, 100,  50,  50,  50,  50]]))
        dispatcher = <function _take_along_axis_dispatcher at 0xf5446118>
        implementation = <function take_along_axis at 0xf5446208>
        kwargs     = {'axis': 0}
        public_api = <function take_along_axis at 0xf5446258>
        relevant_args = (masked_array(
  data=[[--, -97.0, -99.0, ..., -99.0, -79.0, 0.0],
        [--, -85.0, -91.0, ..., -91.0, -65.0, 0.0],...
       [  0,  21,  44,  69,  96, 100, 100, 100, 100, 100, 100, 100, 100,
        100, 100, 100,  50,  50,  50,  50]]))
/usr/lib/python3/dist-packages/numpy/lib/shape_base.py:170: in take_along_axis
    return arr[_make_along_axis_idx(arr_shape, indices, axis)]
        arr        = masked_array(
  data=[[--, -97.0, -99.0, ..., -99.0, -79.0, 0.0],
        [--, -85.0, -91.0, ..., -91.0, -65.0, 0.0],
...  True,  True, ..., False, False, False],
        [ True,  True,  True, ..., False, False, False]],
  fill_value=1e+20)
        arr_shape  = (100, 20)
        axis       = 0
        indices    = array([[ -1,  21,  43,  69,  95,  99,  99,  99,  99,  99,  99,  99,  99,
         99,  99,  99,  49,  49,  49,  49],
       [  0,  21,  44,  69,  96, 100, 100, 100, 100, 100, 100, 100, 100,
        100, 100, 100,  50,  50,  50,  50]])
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = masked_array(
  data=[[--, -97.0, -99.0, ..., -99.0, -79.0, 0.0],
        [--, -85.0, -91.0, ..., -91.0, -65.0, 0.0],
...  True,  True, ..., False, False, False],
        [ True,  True,  True, ..., False, False, False]],
  fill_value=1e+20)
indx = (array([[ -1,  21,  43,  69,  95,  99,  99,  99,  99,  99,  99,  99,  99,
         99,  99,  99,  49,  49,  49,  49],
...0,  50,  50,  50]]), array([[ 0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15,
        16, 17, 18, 19]]))

    def __getitem__(self, indx):
        """
        x.__getitem__(y) <==> x[y]
    
        Return the item described by i, as a masked array.
    
        """
        # We could directly use ndarray.__getitem__ on self.
        # But then we would have to modify __array_finalize__ to prevent the
        # mask of being reshaped if it hasn't been set up properly yet
        # So it's easier to stick to the current version
>       dout = self.data[indx]
E       IndexError: index 100 is out of bounds for axis 0 with size 100

indx       = (array([[ -1,  21,  43,  69,  95,  99,  99,  99,  99,  99,  99,  99,  99,
         99,  99,  99,  49,  49,  49,  49],
...0,  50,  50,  50]]), array([[ 0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15,
        16, 17, 18, 19]]))
self       = masked_array(
  data=[[--, -97.0, -99.0, ..., -99.0, -79.0, 0.0],
        [--, -85.0, -91.0, ..., -91.0, -65.0, 0.0],
...  True,  True, ..., False, False, False],
        [ True,  True,  True, ..., False, False, False]],
  fill_value=1e+20)

/usr/lib/python3/dist-packages/numpy/ma/core.py:3216: IndexError
____________________ test_imputation_mean_median[csc_array] ____________________

csc_container = <class 'scipy.sparse._arrays.csc_array'>

    @pytest.mark.parametrize("csc_container", CSC_CONTAINERS)
    def test_imputation_mean_median(csc_container):
        # Test imputation using the mean and median strategies, when
        # missing_values != 0.
        rng = np.random.RandomState(0)
    
        dim = 10
        dec = 10
        shape = (dim * dim, dim + dec)
    
        zeros = np.zeros(shape[0])
        values = np.arange(1, shape[0] + 1)
        values[4::2] = -values[4::2]
    
        tests = [
            ("mean", np.nan, lambda z, v, p: safe_mean(np.hstack((z, v)))),
            ("median", np.nan, lambda z, v, p: safe_median(np.hstack((z, v)))),
        ]
    
        for strategy, test_missing_values, true_value_fun in tests:
            X = np.empty(shape)
            X_true = np.empty(shape)
            true_statistics = np.empty(shape[1])
    
            # Create a matrix X with columns
            #    - with only zeros,
            #    - with only missing values
            #    - with zeros, missing values and values
            # And a matrix X_true containing all true values
            for j in range(shape[1]):
                nb_zeros = (j - dec + 1 > 0) * (j - dec + 1) * (j - dec + 1)
                nb_missing_values = max(shape[0] + dec * dec - (j + dec) * (j + dec), 0)
                nb_values = shape[0] - nb_zeros - nb_missing_values
    
                z = zeros[:nb_zeros]
                p = np.repeat(test_missing_values, nb_missing_values)
                v = values[rng.permutation(len(values))[:nb_values]]
    
                true_statistics[j] = true_value_fun(z, v, p)
    
                # Create the columns
                X[:, j] = np.hstack((v, z, p))
    
                if 0 == test_missing_values:
                    # XXX unreached code as of v0.22
                    X_true[:, j] = np.hstack(
                        (v, np.repeat(true_statistics[j], nb_missing_values + nb_zeros))
                    )
                else:
                    X_true[:, j] = np.hstack(
                        (v, z, np.repeat(true_statistics[j], nb_missing_values))
                    )
    
                # Shuffle them the same way
                np.random.RandomState(j).shuffle(X[:, j])
                np.random.RandomState(j).shuffle(X_true[:, j])
    
            # Mean doesn't support columns containing NaNs, median does
            if strategy == "median":
                cols_to_keep = ~np.isnan(X_true).any(axis=0)
            else:
                cols_to_keep = ~np.isnan(X_true).all(axis=0)
    
            X_true = X_true[:, cols_to_keep]
    
>           _check_statistics(
                X, X_true, strategy, true_statistics, test_missing_values, csc_container
            )

X          = array([[ nan,  nan,  nan, ...,   0.,   0.,   0.],
       [ nan,  nan,  96., ...,  64.,   0.,   0.],
       [ nan,  nan...  2.,   0.,   0.],
       [ nan, -97., -53., ...,  50.,   0.,   0.],
       [ nan,  nan, -29., ...,  86.,   0.,   0.]])
X_true     = array([[ 40., -16.,  10., ...,   0.,   0.,   0.],
       [ 40.,  96.,  48., ...,  64.,   0.,   0.],
       [ 40., -16....  2.,   0.,   0.],
       [-97., -53., -67., ...,  50.,   0.,   0.],
       [ 40., -29.,  44., ...,  86.,   0.,   0.]])
cols_to_keep = array([False,  True,  True,  True,  True,  True,  True,  True,  True,
        True,  True,  True,  True,  True,  True,  True,  True,  True,
        True,  True])
csc_container = <class 'scipy.sparse._arrays.csc_array'>
dec        = 10
dim        = 10
j          = 19
nb_missing_values = 0
nb_values  = 0
nb_zeros   = 100
p          = array([], dtype=float64)
rng        = RandomState(MT19937) at 0xE20EF7A8
shape      = (100, 20)
strategy   = 'median'
test_missing_values = nan
tests      = [('mean', nan, <function test_imputation_mean_median.<locals>.<lambda> at 0xdf7470c8>), ('median', nan, <function test_imputation_mean_median.<locals>.<lambda> at 0xdf747118>)]
true_statistics = array([  nan,  40. , -16. ,  10. ,   3.5,   2.5,   2.5,   2.5,   2.5,
         2.5,   1.5,   0.5,   0. ,   0. ,   0. ,   0. ,   0. ,   0. ,
         0. ,   0. ])
true_value_fun = <function test_imputation_mean_median.<locals>.<lambda> at 0xdf747118>
v          = array([], dtype=int32)
values     = array([  1,   2,   3,   4,  -5,   6,  -7,   8,  -9,  10, -11,  12, -13,
        14, -15,  16, -17,  18, -19,  20, -21,...  -79,  80, -81,  82, -83,  84, -85,  86, -87,  88, -89,  90, -91,
        92, -93,  94, -95,  96, -97,  98, -99, 100])
z          = array([0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
       0., 0., 0., 0., 0., 0., 0., 0., 0., ...0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
       0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.])
zeros      = array([0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
       0., 0., 0., 0., 0., 0., 0., 0., 0., ...0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
       0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.])

/io/sklearn/impute/tests/test_impute.py:237: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/io/sklearn/impute/tests/test_impute.py:73: in _check_statistics
    X_trans = imputer.fit(X).transform(X.copy())
        X          = array([[ nan,  nan,  nan, ...,   0.,   0.,   0.],
       [ nan,  nan,  96., ...,  64.,   0.,   0.],
       [ nan,  nan...  2.,   0.,   0.],
       [ nan, -97., -53., ...,  50.,   0.,   0.],
       [ nan,  nan, -29., ...,  86.,   0.,   0.]])
        X_true     = array([[ 40., -16.,  10., ...,   0.,   0.,   0.],
       [ 40.,  96.,  48., ...,  64.,   0.,   0.],
       [ 40., -16....  2.,   0.,   0.],
       [-97., -53., -67., ...,  50.,   0.,   0.],
       [ 40., -29.,  44., ...,  86.,   0.,   0.]])
        assert_ae  = <function assert_array_almost_equal at 0xf3621e88>
        err_msg    = 'Parameters: strategy = median, missing_values = nan, sparse = {0}'
        imputer    = SimpleImputer(strategy='median')
        missing_values = nan
        sparse_container = <class 'scipy.sparse._arrays.csc_array'>
        statistics = array([  nan,  40. , -16. ,  10. ,   3.5,   2.5,   2.5,   2.5,   2.5,
         2.5,   1.5,   0.5,   0. ,   0. ,   0. ,   0. ,   0. ,   0. ,
         0. ,   0. ])
        strategy   = 'median'
/io/sklearn/base.py:1514: in wrapper
    return fit_method(estimator, *args, **kwargs)
        args       = (array([[ nan,  nan,  nan, ...,   0.,   0.,   0.],
       [ nan,  nan,  96., ...,  64.,   0.,   0.],
       [ nan,  na...2.,   0.,   0.],
       [ nan, -97., -53., ...,  50.,   0.,   0.],
       [ nan,  nan, -29., ...,  86.,   0.,   0.]]),)
        estimator  = SimpleImputer(strategy='median')
        fit_method = <function SimpleImputer.fit at 0xea2e6168>
        global_skip_validation = False
        kwargs     = {}
        partial_fit_and_fitted = False
        prefer_skip_nested_validation = True
/io/sklearn/impute/_base.py:437: in fit
    self.statistics_ = self._dense_fit(
        X          = array([[ nan,  nan,  nan, ...,   0.,   0.,   0.],
       [ nan,  nan,  96., ...,  64.,   0.,   0.],
       [ nan,  nan...  2.,   0.,   0.],
       [ nan, -97., -53., ...,  50.,   0.,   0.],
       [ nan,  nan, -29., ...,  86.,   0.,   0.]])
        fill_value = 0
        self       = SimpleImputer(strategy='median')
        y          = None
/io/sklearn/impute/_base.py:506: in _dense_fit
    median_masked = np.ma.median(masked_X, axis=0)
        X          = array([[ nan,  nan,  nan, ...,   0.,   0.,   0.],
       [ nan,  nan,  96., ...,  64.,   0.,   0.],
       [ nan,  nan...  2.,   0.,   0.],
       [ nan, -97., -53., ...,  50.,   0.,   0.],
       [ nan,  nan, -29., ...,  86.,   0.,   0.]])
        __class__  = <class 'sklearn.impute._base.SimpleImputer'>
        fill_value = 0
        masked_X   = masked_array(
  data=[[--, --, --, ..., 0.0, 0.0, 0.0],
        [--, --, 96.0, ..., 64.0, 0.0, 0.0],
        [--, --, ... False, False, ..., False, False, False],
        [ True,  True, False, ..., False, False, False]],
  fill_value=1e+20)
        missing_mask = array([[ True,  True,  True, ..., False, False, False],
       [ True,  True, False, ..., False, False, False],
      ...alse],
       [ True, False, False, ..., False, False, False],
       [ True,  True, False, ..., False, False, False]])
        missing_values = nan
        self       = SimpleImputer(strategy='median')
        strategy   = 'median'
/usr/lib/python3/dist-packages/numpy/ma/extras.py:735: in median
    return _ureduce(a, func=_median, keepdims=keepdims, axis=axis, out=out,
        a          = masked_array(
  data=[[--, --, --, ..., 0.0, 0.0, 0.0],
        [--, --, 96.0, ..., 64.0, 0.0, 0.0],
        [--, --, ... False, False, ..., False, False, False],
        [ True,  True, False, ..., False, False, False]],
  fill_value=1e+20)
        axis       = 0
        keepdims   = False
        out        = None
        overwrite_input = False
/usr/lib/python3/dist-packages/numpy/lib/function_base.py:3752: in _ureduce
    r = func(a, **kwargs)
        a          = masked_array(
  data=[[--, --, --, ..., 0.0, 0.0, 0.0],
        [--, --, 96.0, ..., 64.0, 0.0, 0.0],
        [--, --, ... False, False, ..., False, False, False],
        [ True,  True, False, ..., False, False, False]],
  fill_value=1e+20)
        axis       = (0,)
        func       = <function _median at 0xf506b618>
        keepdims   = False
        kwargs     = {'axis': 0, 'out': None, 'overwrite_input': False}
        nd         = 2
        out        = None
/usr/lib/python3/dist-packages/numpy/ma/extras.py:798: in _median
    low_high = np.take_along_axis(asorted, lh, axis=axis)
        a          = masked_array(
  data=[[--, --, --, ..., 0.0, 0.0, 0.0],
        [--, --, 96.0, ..., 64.0, 0.0, 0.0],
        [--, --, ... False, False, ..., False, False, False],
        [ True,  True, False, ..., False, False, False]],
  fill_value=1e+20)
        asorted    = masked_array(
  data=[[--, -97.0, -99.0, ..., -99.0, -79.0, 0.0],
        [--, -85.0, -91.0, ..., -91.0, -65.0, 0.0],
...  True,  True, ..., False, False, False],
        [ True,  True,  True, ..., False, False, False]],
  fill_value=1e+20)
        axis       = 0
        counts     = array([[  0,  21,  44,  69,  96, 100, 100, 100, 100, 100, 100, 100, 100,
        100, 100, 100, 100, 100, 100, 100]], dtype=int32)
        fill_value = inf
        h          = array([[  0,  21,  44,  69,  96, 100, 100, 100, 100, 100, 100, 100, 100,
        100, 100, 100,  50,  50,  50,  50]], dtype=int32)
        l          = array([[-1, 21, 43, 69, 95, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99,
        49, 49, 49, 49]])
        lh         = array([[ -1,  21,  43,  69,  95,  99,  99,  99,  99,  99,  99,  99,  99,
         99,  99,  99,  49,  49,  49,  49],
       [  0,  21,  44,  69,  96, 100, 100, 100, 100, 100, 100, 100, 100,
        100, 100, 100,  50,  50,  50,  50]])
        odd        = array([[False,  True, False,  True, False, False, False, False, False,
        False, False, False, False, False, False, False, False, False,
        False, False]])
        out        = None
        overwrite_input = False
<__array_function__ internals>:200: in take_along_axis
    ???
        args       = (masked_array(
  data=[[--, -97.0, -99.0, ..., -99.0, -79.0, 0.0],
        [--, -85.0, -91.0, ..., -91.0, -65.0, 0.0],...
       [  0,  21,  44,  69,  96, 100, 100, 100, 100, 100, 100, 100, 100,
        100, 100, 100,  50,  50,  50,  50]]))
        dispatcher = <function _take_along_axis_dispatcher at 0xf5446118>
        implementation = <function take_along_axis at 0xf5446208>
        kwargs     = {'axis': 0}
        public_api = <function take_along_axis at 0xf5446258>
        relevant_args = (masked_array(
  data=[[--, -97.0, -99.0, ..., -99.0, -79.0, 0.0],
        [--, -85.0, -91.0, ..., -91.0, -65.0, 0.0],...
       [  0,  21,  44,  69,  96, 100, 100, 100, 100, 100, 100, 100, 100,
        100, 100, 100,  50,  50,  50,  50]]))
/usr/lib/python3/dist-packages/numpy/lib/shape_base.py:170: in take_along_axis
    return arr[_make_along_axis_idx(arr_shape, indices, axis)]
        arr        = masked_array(
  data=[[--, -97.0, -99.0, ..., -99.0, -79.0, 0.0],
        [--, -85.0, -91.0, ..., -91.0, -65.0, 0.0],
...  True,  True, ..., False, False, False],
        [ True,  True,  True, ..., False, False, False]],
  fill_value=1e+20)
        arr_shape  = (100, 20)
        axis       = 0
        indices    = array([[ -1,  21,  43,  69,  95,  99,  99,  99,  99,  99,  99,  99,  99,
         99,  99,  99,  49,  49,  49,  49],
       [  0,  21,  44,  69,  96, 100, 100, 100, 100, 100, 100, 100, 100,
        100, 100, 100,  50,  50,  50,  50]])
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = masked_array(
  data=[[--, -97.0, -99.0, ..., -99.0, -79.0, 0.0],
        [--, -85.0, -91.0, ..., -91.0, -65.0, 0.0],
...  True,  True, ..., False, False, False],
        [ True,  True,  True, ..., False, False, False]],
  fill_value=1e+20)
indx = (array([[ -1,  21,  43,  69,  95,  99,  99,  99,  99,  99,  99,  99,  99,
         99,  99,  99,  49,  49,  49,  49],
...0,  50,  50,  50]]), array([[ 0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15,
        16, 17, 18, 19]]))

    def __getitem__(self, indx):
        """
        x.__getitem__(y) <==> x[y]
    
        Return the item described by i, as a masked array.
    
        """
        # We could directly use ndarray.__getitem__ on self.
        # But then we would have to modify __array_finalize__ to prevent the
        # mask of being reshaped if it hasn't been set up properly yet
        # So it's easier to stick to the current version
>       dout = self.data[indx]
E       IndexError: index 100 is out of bounds for axis 0 with size 100

indx       = (array([[ -1,  21,  43,  69,  95,  99,  99,  99,  99,  99,  99,  99,  99,
         99,  99,  99,  49,  49,  49,  49],
...0,  50,  50,  50]]), array([[ 0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15,
        16, 17, 18, 19]]))
self       = masked_array(
  data=[[--, -97.0, -99.0, ..., -99.0, -79.0, 0.0],
        [--, -85.0, -91.0, ..., -91.0, -65.0, 0.0],
...  True,  True, ..., False, False, False],
        [ True,  True,  True, ..., False, False, False]],
  fill_value=1e+20)

/usr/lib/python3/dist-packages/numpy/ma/core.py:3216: IndexError
___________________________ test_robust_scale_axis1 ____________________________

    def test_robust_scale_axis1():
        X = iris.data
>       X_trans = robust_scale(X, axis=1)

X          = array([[5.1, 3.5, 1.4, 0.2],
       [4.9, 3. , 1.4, 0.2],
       [4.7, 3.2, 1.3, 0.2],
       [4.6, 3.1, 1.5, 0.2],
  ...],
       [6.3, 2.5, 5. , 1.9],
       [6.5, 3. , 5.2, 2. ],
       [6.2, 3.4, 5.4, 2.3],
       [5.9, 3. , 5.1, 1.8]])

/io/sklearn/preprocessing/tests/test_data.py:1580: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/io/sklearn/utils/_param_validation.py:216: in wrapper
    return func(*args, **kwargs)
        args       = (array([[5.1, 3.5, 1.4, 0.2],
       [4.9, 3. , 1.4, 0.2],
       [4.7, 3.2, 1.3, 0.2],
       [4.6, 3.1, 1.5, 0.2],
 ...
       [6.3, 2.5, 5. , 1.9],
       [6.5, 3. , 5.2, 2. ],
       [6.2, 3.4, 5.4, 2.3],
       [5.9, 3. , 5.1, 1.8]]),)
        func       = <function robust_scale at 0xeddd1618>
        func_sig   = <Signature (X, *, axis=0, with_centering=True, with_scaling=True, quantile_range=(25.0, 75.0), copy=True, unit_variance=False)>
        global_skip_validation = False
        kwargs     = {'axis': 1}
        parameter_constraints = {'X': ['array-like', 'sparse matrix'], 'axis': [<sklearn.utils._param_validation.Options object at 0xf4107330>]}
        params     = {'X': array([[5.1, 3.5, 1.4, 0.2],
       [4.9, 3. , 1.4, 0.2],
       [4.7, 3.2, 1.3, 0.2],
       [4.6, 3.1, 1.5, 0....     [6.2, 3.4, 5.4, 2.3],
       [5.9, 3. , 5.1, 1.8]]), 'axis': 1, 'copy': True, 'quantile_range': (25.0, 75.0), ...}
        prefer_skip_nested_validation = False
        to_ignore  = ['self', 'cls']
/io/sklearn/preprocessing/_data.py:1846: in robust_scale
    X = s.fit_transform(X.T).T
        X          = array([[5.1, 3.5, 1.4, 0.2],
       [4.9, 3. , 1.4, 0.2],
       [4.7, 3.2, 1.3, 0.2],
       [4.6, 3.1, 1.5, 0.2],
  ...],
       [6.3, 2.5, 5. , 1.9],
       [6.5, 3. , 5.2, 2. ],
       [6.2, 3.4, 5.4, 2.3],
       [5.9, 3. , 5.1, 1.8]])
        axis       = 1
        copy       = True
        original_ndim = 2
        quantile_range = (25.0, 75.0)
        s          = RobustScaler()
        unit_variance = False
        with_centering = True
        with_scaling = True
/io/sklearn/utils/_set_output.py:319: in wrapped
    data_to_wrap = f(self, X, *args, **kwargs)
        X          = array([[5.1, 4.9, 4.7, 4.6, 5. , 5.4, 4.6, 5. , 4.4, 4.9, 5.4, 4.8, 4.8,
        4.3, 5.8, 5.7, 5.4, 5.1, 5.7, 5.1, 5....,
        1.9, 2. , 2.2, 1.5, 1.4, 2.3, 2.4, 1.8, 1.8, 2.1, 2.4, 2.3, 1.9,
        2.3, 2.5, 2.3, 1.9, 2. , 2.3, 1.8]])
        args       = ()
        f          = <function TransformerMixin.fit_transform at 0xee1378e8>
        kwargs     = {}
        method     = 'transform'
        self       = RobustScaler()
/io/sklearn/base.py:1098: in fit_transform
    return self.fit(X, **fit_params).transform(X)
        X          = array([[5.1, 4.9, 4.7, 4.6, 5. , 5.4, 4.6, 5. , 4.4, 4.9, 5.4, 4.8, 4.8,
        4.3, 5.8, 5.7, 5.4, 5.1, 5.7, 5.1, 5....,
        1.9, 2. , 2.2, 1.5, 1.4, 2.3, 2.4, 1.8, 1.8, 2.1, 2.4, 2.3, 1.9,
        2.3, 2.5, 2.3, 1.9, 2. , 2.3, 1.8]])
        fit_params = {}
        self       = RobustScaler()
        y          = None
/io/sklearn/base.py:1514: in wrapper
    return fit_method(estimator, *args, **kwargs)
        args       = (array([[5.1, 4.9, 4.7, 4.6, 5. , 5.4, 4.6, 5. , 4.4, 4.9, 5.4, 4.8, 4.8,
        4.3, 5.8, 5.7, 5.4, 5.1, 5.7, 5.1, 5...        1.9, 2. , 2.2, 1.5, 1.4, 2.3, 2.4, 1.8, 1.8, 2.1, 2.4, 2.3, 1.9,
        2.3, 2.5, 2.3, 1.9, 2. , 2.3, 1.8]]),)
        estimator  = RobustScaler()
        fit_method = <function RobustScaler.fit at 0xeddd14d8>
        global_skip_validation = False
        kwargs     = {}
        partial_fit_and_fitted = False
        prefer_skip_nested_validation = True
/io/sklearn/preprocessing/_data.py:1612: in fit
    self.center_ = np.nanmedian(X, axis=0)
        X          = array([[5.1, 4.9, 4.7, 4.6, 5. , 5.4, 4.6, 5. , 4.4, 4.9, 5.4, 4.8, 4.8,
        4.3, 5.8, 5.7, 5.4, 5.1, 5.7, 5.1, 5....,
        1.9, 2. , 2.2, 1.5, 1.4, 2.3, 2.4, 1.8, 1.8, 2.1, 2.4, 2.3, 1.9,
        2.3, 2.5, 2.3, 1.9, 2. , 2.3, 1.8]])
        q_max      = 75.0
        q_min      = 25.0
        self       = RobustScaler()
        y          = None
<__array_function__ internals>:200: in nanmedian
    ???
        args       = (array([[5.1, 4.9, 4.7, 4.6, 5. , 5.4, 4.6, 5. , 4.4, 4.9, 5.4, 4.8, 4.8,
        4.3, 5.8, 5.7, 5.4, 5.1, 5.7, 5.1, 5...        1.9, 2. , 2.2, 1.5, 1.4, 2.3, 2.4, 1.8, 1.8, 2.1, 2.4, 2.3, 1.9,
        2.3, 2.5, 2.3, 1.9, 2. , 2.3, 1.8]]),)
        dispatcher = <function _nanmedian_dispatcher at 0xf543c618>
        implementation = <function nanmedian at 0xf543c6b8>
        kwargs     = {'axis': 0}
        public_api = <function nanmedian at 0xf543c708>
        relevant_args = (array([[5.1, 4.9, 4.7, 4.6, 5. , 5.4, 4.6, 5. , 4.4, 4.9, 5.4, 4.8, 4.8,
        4.3, 5.8, 5.7, 5.4, 5.1, 5.7, 5.1, 5...   1.9, 2. , 2.2, 1.5, 1.4, 2.3, 2.4, 1.8, 1.8, 2.1, 2.4, 2.3, 1.9,
        2.3, 2.5, 2.3, 1.9, 2. , 2.3, 1.8]]), None)
/usr/lib/python3/dist-packages/numpy/lib/nanfunctions.py:1217: in nanmedian
    return function_base._ureduce(a, func=_nanmedian, keepdims=keepdims,
        a          = array([[5.1, 4.9, 4.7, 4.6, 5. , 5.4, 4.6, 5. , 4.4, 4.9, 5.4, 4.8, 4.8,
        4.3, 5.8, 5.7, 5.4, 5.1, 5.7, 5.1, 5....,
        1.9, 2. , 2.2, 1.5, 1.4, 2.3, 2.4, 1.8, 1.8, 2.1, 2.4, 2.3, 1.9,
        2.3, 2.5, 2.3, 1.9, 2. , 2.3, 1.8]])
        axis       = 0
        keepdims   = <no value>
        out        = None
        overwrite_input = False
/usr/lib/python3/dist-packages/numpy/lib/function_base.py:3752: in _ureduce
    r = func(a, **kwargs)
        a          = array([[5.1, 4.9, 4.7, 4.6, 5. , 5.4, 4.6, 5. , 4.4, 4.9, 5.4, 4.8, 4.8,
        4.3, 5.8, 5.7, 5.4, 5.1, 5.7, 5.1, 5....,
        1.9, 2. , 2.2, 1.5, 1.4, 2.3, 2.4, 1.8, 1.8, 2.1, 2.4, 2.3, 1.9,
        2.3, 2.5, 2.3, 1.9, 2. , 2.3, 1.8]])
        axis       = (0,)
        func       = <function _nanmedian at 0xf543c578>
        keepdims   = False
        kwargs     = {'axis': 0, 'out': None, 'overwrite_input': False}
        nd         = 2
        out        = None
/usr/lib/python3/dist-packages/numpy/lib/nanfunctions.py:1094: in _nanmedian
    return _nanmedian_small(a, axis, out, overwrite_input)
        a          = array([[5.1, 4.9, 4.7, 4.6, 5. , 5.4, 4.6, 5. , 4.4, 4.9, 5.4, 4.8, 4.8,
        4.3, 5.8, 5.7, 5.4, 5.1, 5.7, 5.1, 5....,
        1.9, 2. , 2.2, 1.5, 1.4, 2.3, 2.4, 1.8, 1.8, 2.1, 2.4, 2.3, 1.9,
        2.3, 2.5, 2.3, 1.9, 2. , 2.3, 1.8]])
        axis       = 0
        out        = None
        overwrite_input = False
/usr/lib/python3/dist-packages/numpy/lib/nanfunctions.py:1109: in _nanmedian_small
    m = np.ma.median(a, axis=axis, overwrite_input=overwrite_input)
        a          = masked_array(
  data=[[5.1, 4.9, 4.7, 4.6, 5.0, 5.4, 4.6, 5.0, 4.4, 4.9, 5.4, 4.8, 4.8,
         4.3, 5.8, 5.7, 5.4, 5...lse, False, False, False, False, False, False,
         False, False, False, False, False, False]],
  fill_value=1e+20)
        axis       = 0
        out        = None
        overwrite_input = False
/usr/lib/python3/dist-packages/numpy/ma/extras.py:735: in median
    return _ureduce(a, func=_median, keepdims=keepdims, axis=axis, out=out,
        a          = masked_array(
  data=[[5.1, 4.9, 4.7, 4.6, 5.0, 5.4, 4.6, 5.0, 4.4, 4.9, 5.4, 4.8, 4.8,
         4.3, 5.8, 5.7, 5.4, 5...lse, False, False, False, False, False, False,
         False, False, False, False, False, False]],
  fill_value=1e+20)
        axis       = 0
        keepdims   = False
        out        = None
        overwrite_input = False
/usr/lib/python3/dist-packages/numpy/lib/function_base.py:3752: in _ureduce
    r = func(a, **kwargs)
        a          = masked_array(
  data=[[5.1, 4.9, 4.7, 4.6, 5.0, 5.4, 4.6, 5.0, 4.4, 4.9, 5.4, 4.8, 4.8,
         4.3, 5.8, 5.7, 5.4, 5...lse, False, False, False, False, False, False,
         False, False, False, False, False, False]],
  fill_value=1e+20)
        axis       = (0,)
        func       = <function _median at 0xf506b618>
        keepdims   = False
        kwargs     = {'axis': 0, 'out': None, 'overwrite_input': False}
        nd         = 2
        out        = None
/usr/lib/python3/dist-packages/numpy/ma/extras.py:798: in _median
    low_high = np.take_along_axis(asorted, lh, axis=axis)
        a          = masked_array(
  data=[[5.1, 4.9, 4.7, 4.6, 5.0, 5.4, 4.6, 5.0, 4.4, 4.9, 5.4, 4.8, 4.8,
         4.3, 5.8, 5.7, 5.4, 5...lse, False, False, False, False, False, False,
         False, False, False, False, False, False]],
  fill_value=1e+20)
        asorted    = masked_array(
  data=[[0.2, 0.2, 0.2, 0.2, 0.2, 0.4, 0.3, 0.2, 0.2, 0.1, 0.2, 0.2, 0.1,
         0.1, 0.2, 0.4, 0.4, 0...lse, False, False, False, False, False, False,
         False, False, False, False, False, False]],
  fill_value=1e+20)
        axis       = 0
        counts     = array([[4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
        4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, ... 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
        4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4]],
      dtype=int32)
        fill_value = inf
        h          = array([[4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
        4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, ... 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
        4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2]],
      dtype=int32)
        l          = array([[3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
        3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, ..., 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
        3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, 1, 1, 1, 1, 1]])
        lh         = array([[3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
        3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, ..., 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
        4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2]])
        odd        = array([[False, False, False, False, False, False, False, False, False,
        False, False, False, False, False, Fals...     False, False, False, False, False, False, False, False, False,
        False, False, False, False, False, False]])
        out        = None
        overwrite_input = False
<__array_function__ internals>:200: in take_along_axis
    ???
        args       = (masked_array(
  data=[[0.2, 0.2, 0.2, 0.2, 0.2, 0.4, 0.3, 0.2, 0.2, 0.1, 0.2, 0.2, 0.1,
         0.1, 0.2, 0.4, 0.4, ... 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
        4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2]]))
        dispatcher = <function _take_along_axis_dispatcher at 0xf5446118>
        implementation = <function take_along_axis at 0xf5446208>
        kwargs     = {'axis': 0}
        public_api = <function take_along_axis at 0xf5446258>
        relevant_args = (masked_array(
  data=[[0.2, 0.2, 0.2, 0.2, 0.2, 0.4, 0.3, 0.2, 0.2, 0.1, 0.2, 0.2, 0.1,
         0.1, 0.2, 0.4, 0.4, ... 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
        4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2]]))
/usr/lib/python3/dist-packages/numpy/lib/shape_base.py:170: in take_along_axis
    return arr[_make_along_axis_idx(arr_shape, indices, axis)]
        arr        = masked_array(
  data=[[0.2, 0.2, 0.2, 0.2, 0.2, 0.4, 0.3, 0.2, 0.2, 0.1, 0.2, 0.2, 0.1,
         0.1, 0.2, 0.4, 0.4, 0...lse, False, False, False, False, False, False,
         False, False, False, False, False, False]],
  fill_value=1e+20)
        arr_shape  = (4, 150)
        axis       = 0
        indices    = array([[3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
        3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, ..., 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
        4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2]])
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = masked_array(
  data=[[0.2, 0.2, 0.2, 0.2, 0.2, 0.4, 0.3, 0.2, 0.2, 0.1, 0.2, 0.2, 0.1,
         0.1, 0.2, 0.4, 0.4, 0...lse, False, False, False, False, False, False,
         False, False, False, False, False, False]],
  fill_value=1e+20)
indx = (array([[3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
        3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,...
        130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142,
        143, 144, 145, 146, 147, 148, 149]]))

    def __getitem__(self, indx):
        """
        x.__getitem__(y) <==> x[y]
    
        Return the item described by i, as a masked array.
    
        """
        # We could directly use ndarray.__getitem__ on self.
        # But then we would have to modify __array_finalize__ to prevent the
        # mask of being reshaped if it hasn't been set up properly yet
        # So it's easier to stick to the current version
>       dout = self.data[indx]
E       IndexError: index 4 is out of bounds for axis 0 with size 4

indx       = (array([[3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
        3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,...
        130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142,
        143, 144, 145, 146, 147, 148, 149]]))
self       = masked_array(
  data=[[0.2, 0.2, 0.2, 0.2, 0.2, 0.4, 0.3, 0.2, 0.2, 0.1, 0.2, 0.2, 0.1,
         0.1, 0.2, 0.4, 0.4, 0...lse, False, False, False, False, False, False,
         False, False, False, False, False, False]],
  fill_value=1e+20)

/usr/lib/python3/dist-packages/numpy/ma/core.py:3216: IndexError

```

</details>

Labels: Build / CI, Numerical Stability