Contour(): levels = n when levels = [1]?

Python 3.7.6
Matplotlib 3.2.1

When running
ax.contour(x,y,z,levels=[1.])
and a contour level of 1 does not exist, it was still drawing a contour. I take it that it was treating levels as an int for the number of levels to draw. I ended up only allowing the call to contour after I check if the max value of the z array was greater than my level. Maybe I am making a mistake by only having 1 contour level, but i thought the default behavior was to assume numeric levels when in an array/list.

Im due for an upgrade so maybe this problem has already been addressed.
Thanks for reading
jimmyc

The following works for me with mpl 3.2.1:

import numpy as np
import matplotlib.pyplot as plt
z = np.random.rand(6, 7)
plt.contour(z, levels=[-1.])

It warns that there are no contours within the data interval, and produces an empty plot.
Can you provide a complete example that fails for you?
Eric