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