def supports_numpy(self):
        """Returns True if the underlying gdb implementation has NumPy support
           (and by extension Python support) False otherwise"""
        if not self.supports_python():
            return False
        # Some gdb's have python 2!
        cmd = ('python from __future__ import print_function;'
               'import numpy; print(numpy)')
        self.interpreter_exec('console', cmd)
        return "module \'numpy\' from" in self._captured.before.decode()
Returns True if the underlying gdb implementation has NumPy support
           (and by extension Python support) False otherwise
numba/tests/gdb_support.py