writing array

H

heidi taynton

Hey guys,


I'm trying to write a new array from the one i already have....


but here is the catch:

I want an array where n=# of data points used in previous point (rounded down)
in every spot, I want to take 1.1**n data points and then take the mean of the data points. (i know there is a numpy function mean() ).. put that is spot 0 and so on... any suggestions?

for clarification:
so the first spot takes 1 data point, b/c 1.1^0 =1 and the average of that is just the data point
the second spot takes 2 data points b/c 1.1^1=1.1 which rounds up to 2.... then the average of those two
the third spot takes 4 data points b/c 1.1^2 = 1.21 .... and then that will repeat....

make sense?

hi
 
P

Piet van Oostrum

heidi taynton said:
ht> Hey guys,

ht> I'm trying to write a new array from the one i already have....

ht> but here is the catch:
ht> I want an array where n=# of data points used in previous point (rounded down)
ht> in every spot, I want to take 1.1**n data points and then take the mean of the data points. (i know there is a numpy function mean() ).. put that is spot 0 and so on... any suggestions?
ht> for clarification:
ht> so the first spot takes 1 data point, b/c 1.1^0 =1 and the average of that is just the data point
ht> the second spot takes 2 data points b/c 1.1^1=1.1 which rounds up to 2.... then the average of those two
ht> the third spot takes 4 data points b/c 1.1^2 = 1.21 .... and then that will repeat....
ht> make sense?

Not much. As 1.1^2=1.21, I would think this would then take 2
datapoints, not 4. If you take at each step n = 1.1^n (rounded up) n
will stay at 2 forever.
And first you talk about rounding down, later about rounding up. So what
is it.

Maybe you should give a better specification?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,175
Messages
2,570,942
Members
47,490
Latest member
Finplus

Latest Threads

Top