I'm messing around with the swarzchild metric, and I keep getting errors. First, it was a memory, which I could have guessed, 10000x10000 array, so I lowered it to 1000x1000 and it moves past that point, now.(adsbygoogle = window.adsbygoogle || []).push({});

However, this is where I'm getting my error:

On the first line of the fill, the one with all the 1's, it's giving me this error:Code (Python):Gravity = zeros([1000,1000])

while i < 1000:

while j < 1000:

Gravity[i,j] = metric(sqrt((RS1*sin(ThetaS1)-i)**2+(RS1*cos(ThetaS1-j)**2)),Rs1,step,ThetaS1,omega1*step,speed1)

Gravity[i,j] += metric(sqrt((RS2*sin(ThetaS2)-i)**2+(RS2*cos(ThetaS2-j)**2)),Rs2,step,ThetaS2,omega2*step,speed2)

print("Done filling\n")

"ValueError: setting an array element with a sequence."

From googling around, it seems that

"the shape of the input list isn't a (generalised) "box" that can be turned into a multidimensional array." -stack exchange.

I was wondering what I am missing that's making this error out?

**Physics Forums | Science Articles, Homework Help, Discussion**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Python Python Errors

Have something to add?

Draft saved
Draft deleted

**Physics Forums | Science Articles, Homework Help, Discussion**