Matt, can you run the code with:
OMP_NUM_THREADS=1 MKL_NUM_THREADS=1 python foo.py

Does that help?
If your machine has lots of cores (20 cores for example), OpenMP’s threading overhead doesn’t fare well for small workloads.