x = np.linspace(-10,10, 21)
z = np.linspace(-10,10, 11)
V = (1/((5+x)**2+(z)**2)**1.5) - 7.9617*(1/((5-x)**2+(z)**2)**1.5 )
error: operands could not be broadcast togetherwith shapes (21,) (11,)
I tried using np.array and np.ndarray but it doesn't work either
The 3rd argument to linspace is how many values to produce, which sets the shape of the resulting array
https://numpy.org/doc/stable/reference/generated/numpy.linspace.html
Oerations which result in broadcasting (such as adding) arrays of different shapes as you're trying to do simply won't work
What do you expect the result to be?