def METHOD_NAME(self, states, out):
    out[:] = 0
    temp = out.copy()
    # !!! WARNING
    # See note above in numbers_to_states
    for (i, dim) in enumerate(self._cum_ns_states_r):
        self._hilbert_spaces[i].states_to_numbers(
            states[:, self._cum_indices[i] : self._cum_sizes[i]], out=temp
        )
        out += temp * dim
    return out