MCPcopy Index your code
hub / github.com/numpy/numpy / main

Function main

numpy/_core/code_generators/generate_umath.py:1669–1690  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1667
1668
1669def main():
1670 parser = argparse.ArgumentParser()
1671 parser.add_argument(
1672 "-o",
1673 "--outfile",
1674 type=str,
1675 help="Path to the output directory"
1676 )
1677 args = parser.parse_args()
1678
1679 # used to insert the name of this file into the generated file
1680 filename = __file__
1681 code = make_code(defdict, filename)
1682
1683 if not args.outfile:
1684 # This is the distutils-based build
1685 outfile = '__umath_generated.c'
1686 else:
1687 outfile = os.path.join(os.getcwd(), args.outfile)
1688
1689 with open(outfile, 'w') as f:
1690 f.write(code)
1691
1692
1693if __name__ == "__main__":

Callers 1

generate_umath.pyFile · 0.70

Calls 4

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

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…