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

Function check_complex

numpy/core/setup.py:245–276  ·  view source on GitHub ↗
(config, mathlibs)

Source from the content-addressed store, hash-verified

243 moredefs.append((fname2def(m), 1))
244
245def check_complex(config, mathlibs):
246 priv = []
247 pub = []
248
249 # Check for complex support
250 st = config.check_header('complex.h')
251 if st:
252 priv.append(('HAVE_COMPLEX_H', 1))
253 pub.append(('NPY_USE_C99_COMPLEX', 1))
254
255 for t in C99_COMPLEX_TYPES:
256 st = config.check_type(t, headers=["complex.h"])
257 if st:
258 pub.append(('NPY_HAVE_%s' % type2def(t), 1))
259
260 def check_prec(prec):
261 flist = [f + prec for f in C99_COMPLEX_FUNCS]
262 decl = dict([(f, True) for f in flist])
263 if not config.check_funcs_once(flist, call=decl, decl=decl,
264 libraries=mathlibs):
265 for f in flist:
266 if config.check_func(f, call=True, decl=True,
267 libraries=mathlibs):
268 priv.append((fname2def(f), 1))
269 else:
270 priv.extend([(fname2def(f), 1) for f in flist])
271
272 check_prec('')
273 check_prec('f')
274 check_prec('l')
275
276 return priv, pub
277
278def check_types(config_cmd, ext, build_dir):
279 private_defines = []

Callers 1

check_complexMethod · 0.85

Calls 4

type2defFunction · 0.85
check_precFunction · 0.85
check_headerMethod · 0.80
check_typeMethod · 0.80

Tested by

no test coverage detected