(target)
| 19 | return docstring |
| 20 | |
| 21 | def write_code(target): |
| 22 | with open(target, 'w') as fid: |
| 23 | fid.write( |
| 24 | "#ifndef NUMPY_CORE_INCLUDE__UMATH_DOC_GENERATED_H_\n" |
| 25 | "#define NUMPY_CORE_INCLUDE__UMATH_DOC_GENERATED_H_\n" |
| 26 | ) |
| 27 | for place, string in docstrings.docdict.items(): |
| 28 | cdef_name = f"DOC_{place.upper().replace('.', '_')}" |
| 29 | cdef_str = normalize_doc(string) |
| 30 | fid.write(f"#define {cdef_name} \"{cdef_str}\"\n") |
| 31 | fid.write("#endif //NUMPY_CORE_INCLUDE__UMATH_DOC_GENERATED_H\n") |
| 32 | |
| 33 | |
| 34 | def main(): |