Buggy python submission (verdict: Runtime Error):
import numpy as np
H,W=map(int,input().split(' '))
maze = [list(input()) for i in range(H)]
maze_w=[]
maze_h=[]
for i in maze:
    cnt = 0
    l = 0
    r = 0
    tmp = ''
    for j in i:
        if j != "#":
            cnt += 1
            r += 1
        elif cnt:
            tmp += str(cnt)*cnt+'0'
            l = r+1
            r = r+1
            cnt = 0
        else:
            tmp +='0'
    if cnt:
        tmp +=str(cnt)*cnt
    maze_w.append(list(tmp))

for i in range(W):
    cnt = 0
    h = 0
    t = 0
    tmp = ""
    for j in range(H):
        if maze[j][i]!='#':
            cnt += 1
            t +=1
        elif cnt:
            tmp += str(cnt)*cnt+'0'
            h = t+1
            t = t+1
            cnt = 0
        else:
            tmp += '0'
    if cnt:
        tmp += str(cnt)*cnt
    maze_h.append(list(tmp))
ans = 0
for i in range(H):
    for j in range(W):
        ans = max(ans,int(maze_h[j][i])+int(maze_w[i][j])-1)
print(ans)

Fixed submission:
import numpy as np
H,W=map(int,input().split(' '))
maze = [list(input()) for i in range(H)]
maze = (np.array(maze) == '.')*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 i in range(W):
    if i==0:
        L[:,i]=maze[:,i]
        R[:,W-i-1]=maze[:,W-i-1]
    else:
        L[:,i]=(L[:,i-1]+1)*maze[:,i]
        R[:,W-i-1]=(R[:,W-i]+1)*maze[:,W-i-1]
for i in range(H):
    if i==0:
        U[i,:]=maze[i,:]
        D[H-i-1,:]=maze[H-i-1,:]
    else:
        U[i,:]=(U[i-1,:]+1)*maze[i,:]
        D[H-i-1,:]=(D[H-i]+1)*maze[H-i-1,:]
print(max(np.max(U+D+L+R-3),0))

Buggy python submission (verdict: Runtime Error):
import numpy as np
H,W=map(int,input().split(' '))
maze = np.array([list(input()) for i in range(H)])
maze_w=[]
maze_h=np.array([['0']*W for i in range(H)])
for i in maze:
    cnt = 0
    l = 0
    r = 0
    tmp = ''
    for j in i:
        if j != "#":
            cnt += 1
            r += 1
        elif cnt:
            tmp += str(cnt)*cnt+'0'
            l = r+1
            r = r+1
            cnt = 0
        else:
            tmp +='0'
    if cnt:
        tmp +=str(cnt)*cnt
    maze_w.append(list(tmp))

for i in range(W):
    cnt = 0
    h = 0
    t = 0
    tmp = ""
    for j in maze[:,i]:
        if j!='#':
            cnt += 1
            t +=1
        elif cnt:
            tmp += str(cnt)*cnt+'0'
            h = t+1
            t = t+1
            cnt = 0
        else:
            tmp += '0'
    if cnt:
        tmp += str(cnt)*cnt
    maze_h[:,i] = list(tmp)
ans = 0
for i in range(H):
    for j in range(W):
        ans = max(ans,int(maze_h[i][j])+int(maze_w[i][j])-1)
print(ans)

Fixed submission:
import numpy as np
H,W=map(int,input().split(' '))
maze = [list(input()) for i in range(H)]
maze = (np.array(maze) == '.')*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 i in range(W):
    if i==0:
        L[:,i]=maze[:,i]
        R[:,W-i-1]=maze[:,W-i-1]
    else:
        L[:,i]=(L[:,i-1]+1)*maze[:,i]
        R[:,W-i-1]=(R[:,W-i]+1)*maze[:,W-i-1]
for i in range(H):
    if i==0:
        U[i,:]=maze[i,:]
        D[H-i-1,:]=maze[H-i-1,:]
    else:
        U[i,:]=(U[i-1,:]+1)*maze[i,:]
        D[H-i-1,:]=(D[H-i]+1)*maze[H-i-1,:]
print(max(np.max(U+D+L+R-3),0))