MCPcopy Create free account
hub / github.com/numpy/numpy / __init__

Method __init__

numpy/distutils/cpuinfo.py:402–417  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

400 info = None
401
402 def __init__(self):
403 if self.info is not None:
404 return
405 info = command_info(arch='arch',
406 mach='mach',
407 uname_i='uname_i',
408 isainfo_b='isainfo -b',
409 isainfo_n='isainfo -n',
410 )
411 info['uname_X'] = key_value_from_command('uname -X', sep='=')
412 for line in command_by_line('psrinfo -v 0'):
413 m = re.match(r'\s*The (?P<p>[\w\d]+) processor operates at', line)
414 if m:
415 info['processor'] = m.group('p')
416 break
417 self.__class__.info = info
418
419 def _not_impl(self): pass
420

Callers

nothing calls this directly

Calls 3

command_infoFunction · 0.85
key_value_from_commandFunction · 0.85
command_by_lineFunction · 0.85

Tested by

no test coverage detected