numpy results in segmentation fault
Pradeep Patra
smilesonisamal at gmail.com
Thu Sep 12 09:53:34 EDT 2019
Hi ,
I was trying to solve the hackerrank and was using python 3.7.x.
https://www.hackerrank.com/challenges/np-concatenate/problem
While running the code sometimes I get success result and sometimes it
fails with "Segmentation Fault" at Hacker rank UI. I dont have any clue why
the code is crashing ? Does anyone have any idea?
Regards
Pradeep
import numpy
n,m,p = map(int,input().split())
tgt_arr1 = []
for i in range(n):
row = list(map(int,input().split()))
tgt_arr1.append(row)
tgt_arr2 = []
for j in range(m):
row = list(map(int,input().split()))
tgt_arr2.append(row)
num_arr1 = numpy.array(tgt_arr1,int)
num_arr2 = numpy.array(tgt_arr2,int)
print(numpy.concatenate((num_arr1,num_arr2),axis=0))
More information about the Python-list
mailing list