Designing high pass filters with remez from DSP

When using the remez function from DSP to design high pass filters, the result is not what I expect. Here is an MWE (1.12.7 plus latest DSP):

using DSP

h = remez(32, [(0.0, 0.2) => 0.0, (0.3, 0.5) => 1.0])
h_obj = PolynomialRatio(h,[1])
H, fax = freqresp(h_obj)
# Plotting here ..

This gives the following frequency response:

On the other hand, changing the filter to lowpass with the exact same conditions gives us a proper filter:

using DSP

h = remez(32, [(0.0, 0.2) => 1.0, (0.3, 0.5) => 0.0])
h_obj = PolynomialRatio(h,[1])
H, fax = freqresp(h_obj)
# Plotting here 

What am I missing here?

So, it turns out that using an even filter order does not work for high pass filters, while odd ones do. Not sure if this is some theoretical limitation or a implementation mishap, but there it is. Should probably be mentioned somewhere anyways…

For highpass linear-phase FIR filters we need an odd number of taps because an even number forces a zero gain at Nyquist (not a problem for low-pass filters).