I want to build an array which will contain arrays of increasing sizes based on the current values of array.
for example with
current_array [100,33]
and
limit = (n//10)
with n=current_array (thus limit_array=[10,3]
I want my output_array to be: [[1,...,10],[1,2,3]]
I wanted to avoid for loops; so I wanted to use arange like that:
output_array=np.arange(current_array, limit_array, 2,dtype=I)
I understand this is not possible to do that since first two arguments for arange are floats only, but then how would you do that?
subsidiary questions:
1) I am not sure numpy can handle arrays of different sizes. If it is not, I can do this with a array array of arrays (https://docs.python.org/3/library/array.html). But I have to do an array multiplication of this array of array.
So will this be slower than array.arrays processed together?
Or should I definitely find another solution?
2) As I said, I have a third np.array [1,2,3] I have to multiply the previous one with.
Will I obtain something like
[[[1,...,10]*1,[1,2,3]],[[1,...,10]*2,[2,4,6]],[[1,...,10]*3,[3,6,9]]] ?
Edit: I also came up with
result_array=np.array()
result_array=np.append( np.arange(current_array, currentlimit, 1) for currentlimit in limit_array)
but not sure it can work