You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/04/05 05:17:06 UTC

[GitHub] anirudhacharya commented on issue #9159: Symbol.bind() do not warn or error on dtype mismatch between Symbol and binding Data

anirudhacharya commented on issue #9159: Symbol.bind() do not warn or error on dtype mismatch between Symbol and binding Data
URL: https://github.com/apache/incubator-mxnet/issues/9159#issuecomment-378822826
 
 
   @sandeep-krishnamurthy  This is a case of type promotion. Why is it an issue? In general in python, or in computer science, a warning or error is required only when there is a loss of information during a data type conversion. 
   
   If a float gets converted to an int then it is a matter of concern, but an int getting converted to a float should not be an issue, because there is no loss of information.
   
   For example, in the below code there is an implicit type promotion for the integer value ``a`` during the addition operation and we don't see any errors or warnings -
   ```python
   a = 1      # int value
   b = 1.5  # float value
   c = a + b
   print(type(c_sum))
   <class 'float'>
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services