
April 20, 2023
5:09 p.m.
On Thu, Apr 20, 2023 at 12:39 PM Evgeni Burovski <evgeny.burovskiy@gmail.com> wrote:
If symmetry w.r.t. pytorch is any guide, it was nice to have it:
In [38]: float(torch.as_tensor([2])) Out[38]: 2.0
In [39]: float(np.asarray([2])) Out[39]: 2.0
My question would be: Did they have a positive use case for this behavior, or were they just reflecting NumPy's behavior? AFAICR, the main reasoning on our side was that there was an unambiguous value that we _could_ return, so we might as well. And in our later experience, it was more trouble than it was worth. -- Robert Kern