79805073

Date: 2025-10-30 17:41:03
Score: 0.5
Natty:
Report link

You can do this efficiently and vectorized in NumPy using broadcasting.

import numpy as np
a = np.array([1, 3, 4, 6])
b = np.array([2, 7, 8, 10, 15])
result = b[:, None] + a
print(result)
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: colonel