Sayth Renshaw wrote:
> def output_data(s):
> serie = fibo(input_length)
> x = []
> y = []
>
> for num1, num2 in pairwise(serie):
> y.append( num2 / num1)
It looks like y contains unique values. In that case replace
> for item in y:
> x.append(y.index(item
Thanks. Hope you found a solution to the problem.
On Tue, Aug 20, 2019, 2:51 AM Cameron Simpson wrote:
> Please remember to CC the list.
>
> On 19Aug2019 22:06, Paul St George wrote:
> >On 19/08/2019 14:16, Cameron Simpson wrote:
> [...]
> >>There's a remark on that web page I mentioned that su
In the docs for itertools.cycle() there is
a bit of equivalent code given:
def cycle(iterable):
# cycle('ABCD') --> A B C D A B C D A B C D ...
saved = []
for element in iterable:
yield element
saved.append(element)
while saved:
The point is to demonstrate the effect, not the specific implementation.
On Wed, Aug 21, 2019 at 2:30 PM Tobiah wrote:
> In the docs for itertools.cycle() there is
> a bit of equivalent code given:
>
> def cycle(iterable):
> # cycle('ABCD') --> A B C D A B C D A B C D ...
>
‐‐‐ Original Message ‐‐‐
On Tuesday, August 20, 2019 10:18 AM, Chris Angelico wrote:
> On Tue, Aug 20, 2019 at 6:59 PM Noah noah-l...@enabled.com wrote:
>
> > Hi,
> > I am trying to migrate information and data between two systems using
> > their corresponding APIs. I am using python requ
On 8/21/19 11:27 AM, Tobiah wrote:
In the docs for itertools.cycle() there is
a bit of equivalent code given:
def cycle(iterable):
# cycle('ABCD') --> A B C D A B C D A B C D ...
saved = []
for element in iterable:
yield element
saved.app
You might could consider using numpy, and storing the points in a list
or list-like class. numpy can convert a list into an array, and then you
can do one line binary operations on each element in the list. An
example, let's assume we start with your implementation, and make a list
of your lines:
On 8/21/19 11:38 AM, Rob Gaddi wrote:
On 8/21/19 11:27 AM, Tobiah wrote:
In the docs for itertools.cycle() there is a bit of equivalent code
given:
def cycle(iterable): # cycle('ABCD') --> A B C D A B C D A B C D
... saved = [] for element in iterable: yield element
saved.append(element) while
On 2019-08-21 11:27, Tobiah wrote:
> In the docs for itertools.cycle() there is
> a bit of equivalent code given:
>
> def cycle(iterable):
> # cycle('ABCD') --> A B C D A B C D A B C D ...
> saved = []
> for element in iterable:
> yield element
>
On Thu, Aug 22, 2019 at 5:56 AM Tobiah wrote:
>
> On 8/21/19 11:38 AM, Rob Gaddi wrote:
> > On 8/21/19 11:27 AM, Tobiah wrote:
> >> In the docs for itertools.cycle() there is a bit of equivalent code
> >> given:
> >>
> >> def cycle(iterable): # cycle('ABCD') --> A B C D A B C D A B C D
> >> ... sa
On Wed, Aug 21, 2019 at 12:36 PM Calvin Spealman
wrote:
>
> The point is to demonstrate the effect, not the specific implementation.
But still yes, that's pretty much exactly what it does. The main difference
between the "roughly equivalent to" code and the actual implementation is
that the forme
On 8/21/19 2:32 PM, Calvin Spealman wrote:
The point is to demonstrate the effect, not the specific implementation.
Once you've gone through the iterable once, it's falsey,
which means that the while loop will end. But if you copy
all the elements to a real list, then the while loop is
infinit
On Thu, Aug 22, 2019 at 6:55 AM Dan Sommers
<2qdxy4rzwzuui...@potatochowder.com> wrote:
>
> On 8/21/19 2:32 PM, Calvin Spealman wrote:
> > The point is to demonstrate the effect, not the specific implementation.
>
> Once you've gone through the iterable once, it's falsey,
> which means that the whi
On 8/21/2019 2:27 PM, Tobiah wrote:
In the docs for itertools.cycle() there is
a bit of equivalent code given:
def cycle(iterable):
# cycle('ABCD') --> A B C D A B C D A B C D ...
saved = []
for element in iterable:
yield element
saved.ap
14 matches
Mail list logo