Repository: pytorch
Issue: Multiplication of `torch.tensor` with `np.array` does the operation with numpy.
Labels: high priority,triaged,module: numpy

## 🐛 Bug

<!-- A clear and concise description of what the bug is. -->

 - Bug: Multiplication of `torch.tensor` with `np.array` silently does the operation with numpy.
 - Correct: Multiplication of `np.array` with `torch.tensor` fails as expected.
 - Insight: Multiplication of `torch.tensor(requires_grad=True)` with `np.array` indicates that the op is done with numpy.

## To Reproduce

The code to show the effect:
```python
import numpy as np
import torch

print(np.__version__)
print(torch.__version__)

a = np.arange(10).astype(np.float32)
a_pt = torch.tensor(a, requires_grad=False)
a_pt * a
# a * a_pt  # -> TypeError: unsupported operand type(s) for *: 'numpy.ndarray' and 'Tensor'
a_pt = torch.tensor(a, requires_grad=True)
a_pt * a
```
and the output
```python
1.19.2
1.7.1+cpu
---------------------------------------------------------------------
RuntimeError                        Traceback (most recent call last)
<ipython-input-26-f0b1e2a27462> in <module>
     10 # a * a_pt  # -> TypeError: unsupported operand type(s) for *: 'numpy.ndarray' and 'Tensor'
     11 a_pt = torch.tensor(a, requires_grad=True)
---> 12 a_pt * a

/opt/conda36/lib/python3.8/site-packages/torch/tensor.py in __array__(self, dtype)
    628             return handle_torch_function(Tensor.__array__, relevant_args, self, dtype=dtype)
    629         if dtype is None:
--> 630             return self.numpy()
    631         else:
    632             return self.numpy().astype(dtype, copy=False)

RuntimeError: Can't call numpy() on Tensor that requires grad. Use tensor.detach().numpy() instead.

```

<!-- If you have a code sample, error messages, stack traces, please provide it here as well -->

## Expected behavior

<!-- A clear and concise description of what you expected to happen. -->

Either fail or do the operation with torch.

## Environment

```
PyTorch version: 1.7.1+cpu
Is debug build: False
CUDA used to build PyTorch: None
ROCM used to build PyTorch: N/A

OS: Ubuntu 20.04.2 LTS (x86_64)
GCC version: (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
Clang version: Could not collect
CMake version: version 3.14.0
Libc version: glibc-2.31

Python version: 3.8 (64-bit runtime)
Python platform: Linux-5.4.0-73-generic-x86_64-with-glibc2.10
Is CUDA available: False
CUDA runtime version: No CUDA
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA
HIP runtime version: N/A
MIOpen runtime version: N/A

Versions of relevant libraries:
[pip3] numpy==1.19.2
[pip3] numpydoc==0.9.2
[pip3] padertorch==0.0.0
[pip3] torch==1.7.1+cpu
[pip3] torch-complex==0.1.2
[pip3] torchaudio==0.8.0.dev20210222
[pip3] torchvision==0.9.0.dev20210222+cpu
[conda] blas                      1.0                         mkl  
[conda] mkl                       2020.1                      217  
[conda] mkl-include               2020.1                      217  
[conda] mkl-service               2.3.0            py38he904b0f_0  
[conda] mkl_fft                   1.2.1            py38h54f3939_0  
[conda] mkl_random                1.1.1            py38h0573a6f_0  
[conda] numpy                     1.19.2           py38h54aff64_0  
[conda] numpy-base                1.19.2           py38hfa32c7d_0  
[conda] numpydoc                  0.9.2                    pypi_0    pypi
[conda] padertorch                0.0.0                     dev_0    <develop>
[conda] torch                     1.7.1+cpu                pypi_0    pypi
[conda] torch-complex             0.1.2                     dev_0    <develop>
[conda] torchaudio                0.8.0.dev20210222          pypi_0    pypi
[conda] torchvision               0.9.0.dev20210222+cpu          pypi_0    pypi
```

## Additional context

<!-- Add any other context about the problem here. -->

Sorry, if this is a duplicate, but I was not able to find if someone already reported this.
I only found discussions about the `__array__` function.


cc @ezyang @gchanan @zou3519 @bdhirsh @jbschlosser @anjali411 @Varal7 @mruberry @rgommers @heitorschueroff