Skip to content

Commit

Permalink
Merge pull request #65 from tirkarthi/fix-warnings
Browse files Browse the repository at this point in the history
Fix syntax warning over comparison of literals using is.
  • Loading branch information
prabhuramachandran committed Nov 28, 2020
2 parents bc3f1a6 + e216d45 commit 5bf7ced
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions compyle/parallel.py
Original file line number Diff line number Diff line change
Expand Up @@ -925,7 +925,7 @@ def _wrap_cython_code(self, func, func_type=None,
expr = '{name}_{modifier}({cargs})'.format(name=name, cargs=cargs,
modifier=func_type)
else:
if func_type is 'input':
if func_type == 'input':
py_data, c_data, expr = self._default_cython_input_function()
else:
py_data, c_data, expr = [], [], None
Expand Down Expand Up @@ -1032,7 +1032,7 @@ def _wrap_ocl_function(self, func, func_type=None, declarations=None):
arguments = self._filter_ignored(c_data[0], select)
c_args = self._filter_ignored(c_data[1], select)
else:
if func_type is 'input':
if func_type == 'input':
if self.backend == 'opencl':
arguments = ['__global %(type)s *input' %
{'type': self.type}]
Expand Down Expand Up @@ -1147,7 +1147,7 @@ def _add_address_space(self, arg):
return arg

def _correct_opencl_address_space(self, c_data, func, func_type):
return_type = 'void' if func_type is 'output' else self.type
return_type = 'void' if func_type == 'output' else self.type
code = self.tp.blocks[-1].code.splitlines()
header_idx = 1
for line in code:
Expand Down

0 comments on commit 5bf7ced

Please sign in to comment.