Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np

h,w=map(int,input().split())
s=[input() for i in range(h)]

l=[[0 for i in range(w)] for j in range(h)]
r=[[0 for i in range(w)] for j in range(h)]
d=[[0 for i in range(w)] for j in range(h)]
u=[[0 for i in range(w)] for j in range(h)]

for i in range(h):
    for j in range(w):
        if s[i][j]==".":
            if j == 0:
                l[i][j]=1
            else:
                l[i][j]=l[i][j-1]+1

for i in range(h):
    for j in range(w-1,-1,-1):
        if s[i][j]==".":
            if j == w-1:
                r[i][j]=1
            else:
                r[i][j]=r[i][j+1]+1

for j in range(w):
    for i in range(h-1,-1,-1):
        if s[i][j]==".":
            if i == h-1:
                d[i][j]=1
            else:
                d[i][j]=d[i+1][j]+1

for j in range(w):
    for i in range(h):
        if s[i][j]==".":
            if i == 0:
                u[i][j]=1
            else:
                u[i][j]=u[i-1][j]+1

ans=0
x=[[0 for i in range(w)] for j in range(h)]
for i in range(h):
    for j in range(w):
        x[i][j] = l[i][j]+r[i][j]+u[i][j]+d[i][j]-3
        ans=max(ans,max(x[i]))

print(ans)

Fixed submission:
import numpy as np

h,w=map(int,input().split())
s=[]
for i in range(h):
    s.append(list(input()))
grid=(np.array(s) ==".") *1

l=np.zeros((h,w),dtype=int)
r=np.zeros((h,w),dtype=int)
u=np.zeros((h,w),dtype=int)
d=np.zeros((h,w),dtype=int)

for j in range(w):
    if j == 0:
        l[:,j] = grid[:,j]
    else:
        l[:,j] = (l[:,j-1]+1) * grid[:,j]
for j in range(w-1,-1,-1):
    if j == (w-1):
        r[:,j] = grid[:,j]
    else:
        r[:,j] = (r[:,j+1] +1)*grid[:,j]

for i in range(h):
    if i == 0:
        u[i,:]=grid[i,:]
    else:
        u[i,:]=(u[i-1,:]+1)*grid[i,:]
for i in range(h-1,-1,-1):
    if i==(h-1):
        d[i,:]=grid[i,:]
    else:
        d[i,:]=(d[i+1,:]+1)*grid[i,:]


ans=np.max(l+r+u+d-3)
print(ans)

Buggy python submission (verdict: Runtime Error):
import numpy as np

h,w=map(int,input().split())
s=[input() for i in range(h)]

l=[[0 for i in range(w)] for j in range(h)]
r=[[0 for i in range(w)] for j in range(h)]
d=[[0 for i in range(w)] for j in range(h)]
u=[[0 for i in range(w)] for j in range(h)]

for i in range(h):
    for j in range(w):
        if s[i][j]==".":
            if j == o:
                l[i][j]=1
            else:
                l[i][j]=l[i][j-1]+1

for i in range(h):
    for i in range(h-1,-1,-1):
        if s[i][j]==".":
            if j == w-1:
                r[i][j]=1
            else:
                r[i][j]=r[i][j+1]+1

for j in range(w):
    for i in range(h-1,-1,-1):
        if s[i][j]==".":
            if i == h-1:
                d[i][j]=1
            else:
                d[i][j]=d[i+1][j]+1

for j in range(w):
    for i in range(h):
        if s[i][j]=".":
            if i == 0:
                u[i][j]=1
            else:
                i[i][j]=u[i-1][j]+1

ans=0
x=[[0 for i in range(w)] for j in range(h)]
for i in range(h):
    for j in range(w):
        x[i][j] = l[i][j]+r[i][j]+u[i][j]+d[i][j]-3
    ans=max(ans,max(x[i]))

print(ans)

Fixed submission:
import numpy as np

h,w=map(int,input().split())
s=[]
for i in range(h):
    s.append(list(input()))
grid=(np.array(s) ==".") *1

l=np.zeros((h,w),dtype=int)
r=np.zeros((h,w),dtype=int)
u=np.zeros((h,w),dtype=int)
d=np.zeros((h,w),dtype=int)

for j in range(w):
    if j == 0:
        l[:,j] = grid[:,j]
    else:
        l[:,j] = (l[:,j-1]+1) * grid[:,j]
for j in range(w-1,-1,-1):
    if j == (w-1):
        r[:,j] = grid[:,j]
    else:
        r[:,j] = (r[:,j+1] +1)*grid[:,j]

for i in range(h):
    if i == 0:
        u[i,:]=grid[i,:]
    else:
        u[i,:]=(u[i-1,:]+1)*grid[i,:]
for i in range(h-1,-1,-1):
    if i==(h-1):
        d[i,:]=grid[i,:]
    else:
        d[i,:]=(d[i+1,:]+1)*grid[i,:]


ans=np.max(l+r+u+d-3)
print(ans)