python (12.9k questions)
javascript (9.2k questions)
reactjs (4.7k questions)
java (4.2k questions)
java (4.2k questions)
c# (3.5k questions)
c# (3.5k questions)
html (3.3k questions)
how to get elements in sub-array of a numpy array in python
I'm getting in trouble with reading the entries of a sub-array of a numpy array, in python. I've got something like this:
a = np.array([ [453,254,[1,2,3,4,5]], [743,251,[10,20,30,40,50]], [127,393,[11...

urgeo
Votes: 0
Answers: 2
why is it showing time limit exceeded?
Given an array of positive integers nums and a positive integer target, return the minimal length of a contiguous subarray [numsl, numsl+1, ..., numsr-1, numsr] of which the sum is greater than or equ...
Prakhar Agrawal
Votes: 0
Answers: 0
Sub-arrays can't be changed individually when created at the same time
I created an array with two sub-arrays containing zeros:
a=[[0]*3]*2
This looks like so:
[[0, 0, 0], [0, 0, 0]]
I try to modify the first value of the first sub-array like this:
a[0][0] = 1
Then th...

LukasFun
Votes: 0
Answers: 0