• Pascal Lamblin's avatar
    dtype of tensor.sum(): forbid downcasting · 6a7aa408
    Pascal Lamblin 提交于
    If the output dtype would force a downcasting of the values
    (for instance, summing a float vector into an integer), a TypeError
    is now raised.
    
    Also, a Sum node has to have a non-None dtype. It is checked in
    make_node because for some reason the pretty-printing mechanism needs to
    instanciate "Sum()".
    6a7aa408
elemwise.py 66.0 KB