• Olivier Delalleau's avatar
    Added a 'size' attribute to tensors · f82ca39e
    Olivier Delalleau 提交于
    This behaves the same as in numpy:
    - For dense tensors it is the product of the shape elements.
    - For sparse tensors it is the number of elements actually stored
    (including zeros that are explicitly stored).
    f82ca39e
basic.py 58.7 KB