1c10f0dc589fc13e011d8ffc61f3d94c8d6adbb8,pymanopt/core/problem.py,Problem,_flatten_arguments,#Problem#,99
Before Change
if isinstance(group, (list, tuple)):
flattened_arguments.extend(arguments[i])
else:
flattened_arguments.append(arguments[i])
return flattened_arguments
def _group_return_values(self, function, signature):
Wraps a function inside another function which groups the return
After Change
flattened_arguments = []
for i, group_size in enumerate(signature):
argument = arguments[i]
if group_size == 1:
assert not isinstance(argument, (list, tuple))
flattened_arguments.append(argument)
else:
assert len(argument) == group_size
flattened_arguments.extend(argument)
return flattened_arguments
def _group_return_values(self, function, signature):
Wraps a function inside another function which groups the return
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 3
Instances Project Name: pymanopt/pymanopt
Commit Name: 1c10f0dc589fc13e011d8ffc61f3d94c8d6adbb8
Time: 2020-02-02
Author: niklas.koep@gmail.com
File Name: pymanopt/core/problem.py
Class Name: Problem
Method Name: _flatten_arguments
Project Name: GPflow/GPflow
Commit Name: 7560936f09755b3fafe03ae1c5ccebb3c93984b6
Time: 2020-05-12
Author: st--@users.noreply.github.com
File Name: setup.py
Class Name:
Method Name:
Project Name: recipy/recipy
Commit Name: b9e746200c449e9d8d78124d9edadeb1b299018e
Time: 2016-10-25
Author: michaelj@epcc.ed.ac.uk
File Name: integration_test/test_packages.py
Class Name:
Method Name: get_script_test_cases
Project Name: matthewwithanm/django-imagekit
Commit Name: 2387cc4be2274aa841672c2eccb9c7fc5d077354
Time: 2011-09-02
Author: matthew@exanimo.com
File Name: imagekit/models.py
Class Name: ImageModelBase
Method Name: __init__