79330772

Date: 2025-01-05 13:15:02
Score: 1
Natty:
Report link
def getShape(obj):
    print(obj.shape)

getShape(np.zeros([2, 3]))
getShape(torch.zeros(2, 3))

By passing an ndarray or tensor to a function and calling getShape() get the shape of both with the same call.

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Mr Jaguar