<SYSTEM_TASK:>
Given the following text problem statement, write Python code to implement the functionality described below in problem statement
<END_TASK>
<USER_TASK:>
Problem:
Similar to this answer, I have a pair of 3D numpy arrays, a and b, and I want to sort the entries of b by the values of a. Unlike this answer, I want to sort only along one axis of the arrays, in decreasing order.
<ASSISTANT_TASK:>
Python Code:
import numpy as np
a = np.random.rand(3, 3, 3)
b = np.arange(3*3*3).reshape((3, 3, 3))
sort_indices = np.argsort(a, axis=0)[::-1, :, :]
static_indices = np.indices(a.shape)
c = b[sort_indices, static_indices[1], static_indices[2]]
<END_TASK>