RE: Can you help me with this memoization simple example?

2024-03-31 Thread AVI GROSS via Python-list
the memorize function you make gets relatively few requests that are identical, it may not be worthwhile. -Original Message- From: Python-list On Behalf Of MRAB via Python-list Sent: Sunday, March 31, 2024 3:24 PM To: python-list@python.org Subject: Re: Can you help me with this

Re: Can you help me with this memoization simple example?

2024-03-31 Thread MRAB via Python-list
On 2024-03-31 09:04, marc nicole wrote: Thanks for the first comment which I incorporated but when you say "You can't use a list as a key, but you can use a tuple as a key, provided that the elements of the tuple are also immutable." does it mean  the result of sum of the array is not conveni

Re: Can you help me with this memoization simple example?

2024-03-31 Thread marc nicole via Python-list
Thanks for the first comment which I incorporated but when you say "You can't use a list as a key, but you can use a tuple as a key, provided that the elements of the tuple are also immutable." does it mean the result of sum of the array is not convenient to use as key as I do? Which tuple I sho

Re: Can you help me with this memoization simple example?

2024-03-30 Thread MRAB via Python-list
On 2024-03-31 00:09, marc nicole via Python-list wrote: I am creating a memoization example with a function that adds up / averages the elements of an array and compares it with the cached ones to retrieve them in case they are already stored. In addition, I want to store only if the result of t

Can you help me with this memoization simple example?

2024-03-30 Thread marc nicole via Python-list
I am creating a memoization example with a function that adds up / averages the elements of an array and compares it with the cached ones to retrieve them in case they are already stored. In addition, I want to store only if the result of the function differs considerably (passes a threshold e.g.

Re: Fwd: Can you help me with this Python question?

2022-10-13 Thread Axy via Python-list
Well, although I never used pandas and never will, if that's about artworks, that's mine. Obviously, you need to iterate columns and sum values returned by the snippet you provided. A quick search tells us to use colums property. So, it might look like this: na_sum = sum(df[name].isnull().su

Fwd: Can you help me with this Python question?

2022-10-13 Thread Sarah Wallace
For a python class I am taking.. In this challenge, you'll be working with a DataFrame that contains data about artworks, and it contains many missing values. Your task is to create a variable called na_sum that contains the total number of missing values in the DataFrame. When that's completed,

Re: Can you help me solve this?

2020-03-16 Thread Pieter van Oostrum
Pieter van Oostrum writes: > Joseph Nail writes: > >> Hello, >> I have one problem. Somehow in my function when I wrote y=x, they are the >> same variable and then it also changes age or height (which were x) in the >> main program. See more in attached file. >> Maybe it is bug or maybe it shoul

Re: Can you help me solve this?

2020-03-16 Thread Pieter van Oostrum
Joseph Nail writes: > Hello, > I have one problem. Somehow in my function when I wrote y=x, they are the > same variable and then it also changes age or height (which were x) in the > main program. See more in attached file. > Maybe it is bug or maybe it should run that way. If you write y = x,

Re: Can you help me solve this?

2020-03-16 Thread Igor Korot
Hi, On Mon, Mar 16, 2020 at 4:26 PM Joseph Nail wrote: > > Hello, > I have one problem. Somehow in my function when I wrote y=x, they are the > same variable and then it also changes age or height (which were x) in the > main program. See more in attached file. > Maybe it is bug or maybe it shoul

Can you help me solve this?

2020-03-16 Thread Joseph Nail
Hello, I have one problem. Somehow in my function when I wrote y=x, they are the same variable and then it also changes age or height (which were x) in the main program. See more in attached file. Maybe it is bug or maybe it should run that way. -- https://mail.python.org/mailman/listinfo/python-l

Re: hello please can you help me with the below problem am facing

2015-01-09 Thread gcptesthp
On Friday, January 9, 2015 at 3:47:27 AM UTC-8, mubarak idris wrote: > Please how can I make an .exe executable app out of my python script easily http://www.py2exe.org/ -- https://mail.python.org/mailman/listinfo/python-list

hello please can you help me with the below problem am facing

2015-01-09 Thread mubarak idris
Please how can I make an .exe executable app out of my python script easily -- https://mail.python.org/mailman/listinfo/python-list

Can you help me???

2013-02-09 Thread MoneyMaker
Are you traveling abroad on holiday??? Does the resort have enough information on the internet??? Would you like to ask local people information about attractions, good places to eat, nice places, that is, just about anything??? For this site, I have asked people around the world to join and tel

can you help me

2008-06-05 Thread merzouki tarek
  hello please, I have this error, error C1083 Cannot open include file BaseTsd.h, invalide argument, I installed the platformSDK , but the same error , can you help me __ Do You Yahoo!? En finir avec le spam? Yahoo! Mail vous offre la

Re: Can you help me with the below code? Urgent!

2006-06-25 Thread gokcemutlu
Hello, Thanks for your help. I just copy things that I want to keep using copy.copy function. Trying to copy frames won't lead me to anywhere :) Gokce. Pierre Quentel schrieb: > [EMAIL PROTECTED] a écrit : > > > Hello, > > > > You're right about it but this is a simple code which tells my probl

Re: Can you help me with the below code? Urgent!

2006-06-25 Thread Pierre Quentel
[EMAIL PROTECTED] a écrit : > Hello, > > You're right about it but this is a simple code which tells my problem. > I need actually the frame itself for states and unfortunately > copy.copy(frame) throws an exception. Pickling also doesn't work. Do > you have any other idea? > > Thanks, > > Gokce.

Re: Can you help me with the below code? Urgent!

2006-06-25 Thread gokcemutlu
Hello, You're right about it but this is a simple code which tells my problem. I need actually the frame itself for states and unfortunately copy.copy(frame) throws an exception. Pickling also doesn't work. Do you have any other idea? Thanks, Gokce. Pierre Quentel schrieb: > This is because i

Re: Can you help me with the below code? Urgent!

2006-06-25 Thread Pierre Quentel
This is because in "states" you store a reference to frame.f_locals, not the value it takes. When you print states, all the items are the same reference to the same object and have the same value If you want to store the values at each cycle you should store a copy of frame.f_locals, which will gi

Can you help me with the below code? Urgent!

2006-06-25 Thread gokcemutlu
I want to trace a function while it executes and keep its local variables as states. In trace function all the things work well but after all when I print states, they are all the same. I couldn't solve the problem. I guess it's because of frame, please can you help me? import s