Update convert_inputs_to_tensors
to require Python numbers
#168
Labels
tripy
Pull request for the tripy project
convert_inputs_to_tensors
to require Python numbers
#168
convert_inputs_to_tensors
currently passes any non-tensor arguments directly to theTensor
constructor, which means that it ends up enabling more than just Python numbers (which was its original intention) in our APIs. The issue is that this makes the API inconsistent, with some APIs working fine with DLPack tensors and others not.We should update
convert_inputs_to_tensors
to only accept Python numbers to avoid this.This change will also make it slightly easier to fix #154 since we can just look at the Python type to determine whether or not to allow automatic type conversions.
The text was updated successfully, but these errors were encountered: