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

Function main

numpy/core/code_generators/generate_umath.py:1399–1420  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1397
1398
1399def main():
1400 parser = argparse.ArgumentParser()
1401 parser.add_argument(
1402 "-o",
1403 "--outfile",
1404 type=str,
1405 help="Path to the output directory"
1406 )
1407 args = parser.parse_args()
1408
1409 # used to insert the name of this file into the generated file
1410 filename = __file__
1411 code = make_code(defdict, filename)
1412
1413 if not args.outfile:
1414 # This is the distutils-based build
1415 outfile = '__umath_generated.c'
1416 else:
1417 outfile = os.path.join(os.getcwd(), args.outfile)
1418
1419 with open(outfile, 'w') as f:
1420 f.write(code)
1421
1422
1423if __name__ == "__main__":

Callers 1

generate_umath.pyFile · 0.70

Calls 4

make_codeFunction · 0.85
openFunction · 0.85
joinMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected