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

Method calc_info

numpy/distutils/system_info.py:2557–2590  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2555 shutil.rmtree(tmpdir)
2556
2557 def calc_info(self):
2558 lib_dirs = self.get_lib_dirs()
2559 flame_libs = self.get_libs('libraries', self._lib_names)
2560
2561 info = self.check_libs2(lib_dirs, flame_libs, [])
2562 if info is None:
2563 return
2564
2565 # Add the extra flag args to info
2566 extra_info = self.calc_extra_info()
2567 dict_append(info, **extra_info)
2568
2569 if self.check_embedded_lapack(info):
2570 # check if the user has supplied all information required
2571 self.set_info(**info)
2572 else:
2573 # Try and get the BLAS lib to see if we can get it to work
2574 blas_info = get_info('blas_opt')
2575 if not blas_info:
2576 # since we already failed once, this ain't going to work either
2577 return
2578
2579 # Now we need to merge the two dictionaries
2580 for key in blas_info:
2581 if isinstance(blas_info[key], list):
2582 info[key] = info.get(key, []) + blas_info[key]
2583 elif isinstance(blas_info[key], tuple):
2584 info[key] = info.get(key, ()) + blas_info[key]
2585 else:
2586 info[key] = info.get(key, '') + blas_info[key]
2587
2588 # Now check again
2589 if self.check_embedded_lapack(info):
2590 self.set_info(**info)
2591
2592
2593class accelerate_info(system_info):

Callers

nothing calls this directly

Calls 9

check_embedded_lapackMethod · 0.95
get_lib_dirsMethod · 0.80
get_libsMethod · 0.80
check_libs2Method · 0.80
calc_extra_infoMethod · 0.80
set_infoMethod · 0.80
dict_appendFunction · 0.70
get_infoFunction · 0.70
getMethod · 0.45

Tested by

no test coverage detected