summaryrefslogtreecommitdiff
path: root/numpy/core
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/core')
-rw-r--r--numpy/core/code_generators/generate_umath.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/numpy/core/code_generators/generate_umath.py b/numpy/core/code_generators/generate_umath.py
index 4fe24fae2..ba57d53e0 100644
--- a/numpy/core/code_generators/generate_umath.py
+++ b/numpy/core/code_generators/generate_umath.py
@@ -673,6 +673,10 @@ def make_ufuncs(funcdict):
mlist = []
docstring = textwrap.dedent(uf.docstring).strip()
docstring = docstring.encode('string-escape').replace(r'"', r'\"')
+ # Split the docstring because some compilers (like MS) do not like big
+ # string literal in C code. We split at endlines because textwrap.wrap
+ # do not play well with \n
+ docstring = '\\n\"\"'.join(docstring.split(r"\n"))
mlist.append(\
r"""f = PyUFunc_FromFuncAndData(%s_functions, %s_data, %s_signatures, %d,
%d, %d, %s, "%s",