6837a576bed4465d1a1e2b757708880e8a1d8a30,src/syft/lib/python/primitive_factory.py,PrimitiveFactory,generate_primitive,#Any#,12
Before Change
from .int import Int
from .none import SyNone
if type(value) is int:
return Int(value=value)
if type(value) is float:
return Float(value=value)
if type(value) is bool:
return Bool(value=value)
if type(value) is complex :
return Complex(value=value)
return SyNone()
After Change
from .int import Int
from .none import SyNone
if isinstance(value, int) :
return Int(value=value)
if isinstance(value, float):
return Float(value=value)
if isinstance(value, bool) :
return Bool(value=value)
if isinstance(value, complex) :
return Complex(value=value)
return SyNone()
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 13
Instances Project Name: OpenMined/PySyft
Commit Name: 6837a576bed4465d1a1e2b757708880e8a1d8a30
Time: 2020-09-07
Author: jason.paumier@gmail.com
File Name: src/syft/lib/python/primitive_factory.py
Class Name: PrimitiveFactory
Method Name: generate_primitive
Project Name: pysb/pysb
Commit Name: 85625b234bfb86fe91db859bd71fbc05fcad5c30
Time: 2016-10-13
Author: bachmanjohn@gmail.com
File Name: pysb/generator/kappa.py
Class Name:
Method Name: format_site_condition
Project Name: deepmipt/DeepPavlov
Commit Name: ecb4dacbf793ee4276dd7ad4625bf2cb53feb9a1
Time: 2018-11-17
Author: yoptar@gmail.com
File Name: deeppavlov/core/common/params_search.py
Class Name: ParamsSearch
Method Name: find_model_path
Project Name: OpenMined/PySyft
Commit Name: 6837a576bed4465d1a1e2b757708880e8a1d8a30
Time: 2020-09-07
Author: jason.paumier@gmail.com
File Name: src/syft/lib/python/primitive_factory.py
Class Name: PrimitiveFactory
Method Name: generate_primitive