We should normally have $$MAE \leq RMSE$$
This is a consequence of the triangle inequality (in a similar way as 'square of the mean values < mean of the squared values')
$$
\overbrace{\left(\frac{\vert r_1 \vert + \vert r_2\vert + \dots + \vert r_n \vert}{n} \right)^2}^{MAE^2} \leq \overbrace{\frac{\vert r_1 \vert^2 + \vert r_2\vert^2 + \dots + \vert r_n \vert^2}{n}}^{RMSE^2}$$
We can derive this more explicitly as following by expressing the absolute value of the error terms $\vert r_i \vert$ as a sum of two components: the mean of the absolute value of the error terms and the variation relative to that mean, $\vert r_i \vert = \mu + \delta_{i}$.
$$\begin{array}{}
\overbrace{(r_1^2 + r_2^2 + \dots + r_n^2)}^{n \cdot RMSE^2} &=& \vert r_1 \vert^2 + \vert r_2\vert^2 + \dots + \vert r_n \vert^2 \\
& = & (\mu+\delta_1)^2 + (\mu+\delta_2)^2 +\dots + (\mu+\delta_n)^2\\
& = & n \mu^2 + 2 \mu (\delta_1 + \delta_2 +\dots + \delta_n) + \delta_1^2 + \delta_2^2 + \dots + \delta_n^2\\
& = & n \mu^2 + \delta_1^2 + \delta_2^2 + \dots + \delta_n^2 \geq \underbrace{n\mu^2}_{n \cdot MAE^2}
\end{array}$$
The step where $2 \mu (\delta_1 + \delta_2 +\dots + \delta_n)$ is removed comes from $\overline{\delta_{\vert r_i \vert}}=0$. Note that this must be the case for $\mu$ to be the mean of ${\vert r_i \vert}$, since $\overline{\vert r_i \vert} = \overline{\mu + \delta_i} = \overline{\mu} + \overline{\delta_i} = \mu + \overline{\delta_i}$)
The equality arises when you have all $\delta_i=0$, this is the case when $\vert r_i \vert = \mu$, or when $r_i = \pm \mu$.
Possible exception for different definition of 'mean'
Normally you compute the mean operation in RMSE and MAE by division with $n$ and then you get the inequality
$$\frac{(r_1^2 + r_2^2 + \dots + r_n^2)}{n} \geq \left( \frac{\vert r_1\vert + \vert r_2\vert + \dots + \vert r_n\vert }{n} \right)^2$$
But it is possible that you use a division by $n-1$ or $n-p$. And you compare
$$\frac{(r_1^2 + r_2^2 + \dots + r_n^2)}{n-p} \quad\text{versus} \quad \left( \frac{\vert r_1\vert + \vert r_2\vert + \dots + \vert r_n\vert }{n-p} \right)^2$$
In this case it is possible that the right side is larger than the left side. Maybe this is the case for your code where you mention different methods to compute MAE and RMSE.
Example: let $r_1 = r_2 = 1$ and $r_3 = r_4 = -1$, let $n=4$ and $p=1$, then
$$\begin{array}{rcccl}
RMSE &=& \sqrt{\frac{1^2+1^2+(-1)^2+(-1)^2}{3}} &=& \sqrt{\frac{4}{3}} &\approx& 1.1547 \\
MAE &=& \frac{\vert 1 \vert+\vert 1 \vert+\vert -1 \vert+\vert -1 \vert}{3} &=& {\frac{4}{3}} &\approx& 1.3333
\end{array}$$