This has been fixed upstream. The fix is here: https://github.com/numpy/numpy/pull/8713 https://github.com/numpy/numpy/commit/2fe5a4757e840362b7158e8548e26ffc9ef8b562
Only the one-line addition to loops.c.src is required; the rest is a test. Could we have this fixed in Stretch?