Solved by stefanonardo in post #2 
              
              
                Convert them both to float. In the first case you get a type inference error based on the first argument. In the second case the runtime error says that you should not use long tensors.