Skip to content

Commit 9e18123

Browse files
Fix for error message in case of viraible type inconsistency
1 parent 998c204 commit 9e18123

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

mkl-service/_mkl_service.pyx

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -311,14 +311,9 @@ cpdef vml_clear_err_status():
311311
cdef inline __mkl_str_to_int(variable, possible_variables_dict):
312312
assert(variable is not None)
313313
assert(possible_variables_dict is not None)
314+
assert(variable in possible_variables_dict.keys()), 'Variable: <' + str(variable) + '> not in ' + str(possible_variables_dict)
314315

315-
variable_type = type(variable)
316-
317-
if variable_type is str:
318-
assert(variable in possible_variables_dict.keys()), 'Variable: <' + str(variable) + '> not in ' + str(possible_variables_dict)
319-
mkl_variable = possible_variables_dict[variable]
320-
321-
return mkl_variable
316+
return possible_variables_dict[variable]
322317

323318

324319
cdef inline __mkl_int_to_str(mkl_int_variable, possible_variables_dict):

0 commit comments

Comments
 (0)