Skip to content

Legacy Python2 and early Python3 leftovers #42919

@vadimkantorov

Description

@vadimkantorov
  1. A lot of references to Python 2 and workarounds: https://github.com/pytorch/pytorch/blob/master/torch/tensor.py
  2. L631:
        if array.dtype == bool:
            # Workaround, torch has no built-in bool tensor
            array = array.astype('uint8')

But PyTorch has built-in bool tensor since a long while

cc @ezyang

Metadata

Metadata

Assignees

No one assigned

    Labels

    OSS contribution wantedPR from open source contributors welcome to solve this issue.better-engineeringRelatively self-contained tasks for better engineering contributorsshadow reviewRequest the triage shadow to take a second look at your triage and see if they agree or nottriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate module

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions