Skip to content

Commit

Permalink
MAINT: special: make generate_ufuncs.py work in python 3
Browse files Browse the repository at this point in the history
  • Loading branch information
person142 committed Sep 3, 2016
1 parent e6923ab commit 80af226
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scipy/special/generate_ufuncs.py
Original file line number Diff line number Diff line change
Expand Up @@ -770,7 +770,7 @@ def generate_doc(name, specs):
for spec in specs:
incodes, outcodes = spec.split("->")
incodes = incodes.split("*")
intypes = map(lambda x: CY_TYPES[x], incodes[0])
intypes = list(map(lambda x: CY_TYPES[x], incodes[0]))
if len(incodes) > 1:
types = map(lambda x: "{} *".format(CY_TYPES[x]), incodes[1])
intypes.extend(types)
Expand Down Expand Up @@ -1206,7 +1206,7 @@ def _get_nan_decs(self):
all_codes.append(codes)
all_codes = tuple(all_codes)

codelens = map(lambda x: len(x), all_codes)
codelens = list(map(lambda x: len(x), all_codes))
last = numpy.product(codelens) - 1
for m, codes in enumerate(itertools.product(*all_codes)):
fused_codes, decs = [], []
Expand Down Expand Up @@ -1283,8 +1283,8 @@ def _get_common(self, signum, sig):
else:
cpp = False

intypes = map(lambda x: CY_TYPES[x], incodes)
outtypes = map(lambda x: CY_TYPES[x], outcodes)
intypes = list(map(lambda x: CY_TYPES[x], incodes))
outtypes = list(map(lambda x: CY_TYPES[x], outcodes))
retcode = re.sub(r'\*.*', '', retcode)
if not retcode:
retcode = 'v'
Expand Down

0 comments on commit 80af226

Please sign in to comment.