I have a matrix that looks like this:

```
a = np.random.rand(3, 3, 3)

[[[0.04331462, 0.30333583, 0.37462236],
  [0.30225757, 0.35859228, 0.57845153],
  [0.49995805, 0.3539933,  0.11172398]],

 [[0.28983508, 0.31122743, 0.67818926],
  [0.42720309, 0.24416101, 0.5469823 ],
  [0.22894097, 0.76159389, 0.80416832]],

 [[0.25661154, 0.64389696, 0.37555374],
  [0.87871659, 0.27806621, 0.3486518 ],
  [0.26388296, 0.8993144,  0.7857116 ]]]

```

I want to check every block for a value smaller than 0.2. If value is smaller than 0.2 then the whole block equals 0.2. In this case:

```
[[[0.2 0.2 0.2]
  [0.2 0.2 0.2]
  [0.2 0.2 0.2]]

[[0.28983508 0.31122743 0.67818926]
 [0.42720309 0.24416101 0.5469823 ]
 [0.22894097 0.76159389 0.80416832]]

[[0.25661154 0.64389696 0.37555374]
 [0.87871659 0.27806621 0.3486518 ]
 [0.26388296 0.8993144  0.7857116 ]]]

```