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

Function make_code

numpy/_core/code_generators/generate_umath.py:1634–1666  ·  view source on GitHub ↗
(funcdict, filename)

Source from the content-addressed store, hash-verified

1632
1633
1634def make_code(funcdict, filename):
1635 code1, code2 = make_arrays(funcdict)
1636 code3 = make_ufuncs(funcdict)
1637 code2 = indent(code2, 4)
1638 code3 = indent(code3, 4)
1639 code = textwrap.dedent(r"""
1640
1641 /** Warning this file is autogenerated!!!
1642
1643 Please make changes to the code generator program (%s)
1644 **/
1645 #include "ufunc_object.h"
1646 #include "ufunc_type_resolution.h"
1647 #include "loops.h"
1648 #include "matmul.h"
1649 #include "clip.h"
1650 #include "dtypemeta.h"
1651 #include "dispatching.h"
1652 #include "_umath_doc_generated.h"
1653
1654 %s
1655
1656 static int
1657 InitOperators(PyObject *dictionary) {
1658 PyObject *f, *identity;
1659
1660 %s
1661 %s
1662
1663 return 0;
1664 }
1665 """) % (os.path.basename(filename), code1, code2, code3)
1666 return code
1667
1668
1669def main():

Callers 1

mainFunction · 0.85

Calls 3

make_arraysFunction · 0.85
make_ufuncsFunction · 0.85
indentFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…