Skip to content

device_property and class_property: convert str default value to proper type

Closes #725 (closed)

I am not sure, how we would like to handle such situation: do we force default_value to be the compatible type with dtype, or we allow being str too at least

The problem is that comprehensive type check is complicated. E.g. for float user can give 'float', int - I do not see heve problem, or he can give np.float, np.int_ - etc

So I think we can just treat the default_value in the same way we treat value from DB - if it is str - we convert it to expected type, if not - then type match is on the user.

Edited by Anton Joubert

Merge request reports

Loading