Thanks every body,
I want to close the subject, but just a naive question:
Does numpy use a* vectorization *for arrays?
I mean when I add 2 arrays ( or in sum function) how it is done,
in an other word
b=np.arange(100);
t=np.sum(b)
is equivalent or not to
s=0
for i in range(100): s +=b[i]
thanks
On Fri, Feb 25, 2022 at 8:12 AM BELAHCENE Abdelkader <
abdelkader.belahc...@enst.dz> wrote:
> Hi,
> a lot of people think that C (or C++) is faster than python, yes I agree,
> but I think that's not the case with numpy, I believe numpy is faster than
> C, at least in some cases.
>
This is all "la
On Fri, Feb 25, 2022 at 9:03 PM Chris Angelico wrote:
> On Sat, 26 Feb 2022 at 15:39, Avi Gross via Python-list
> wrote:
> > Take interpreted languages including Python and R that specify all kinds
> of functions that may be written within the language at first. Someone may
> implement a functio
On Sat, 26 Feb 2022 at 15:39, Avi Gross via Python-list
wrote:
> Take interpreted languages including Python and R that specify all kinds of
> functions that may be written within the language at first. Someone may
> implement a function like sum() (just an example) that looks like the sum of
>
Agreed, Chris. There are many ways to get something done. I often use the
Anaconda distribution because it tends to bundle many of the modules I need and
more.
Not that it is such a big deal to load the ones you need, but if you share your
program, others trying to use it may have some problems
Yes, Chris, C is real as a somewhat abstract concept. There are a whole slew of
different variations each time it is released anew with changes and then some
people at various times built actual compilers that implement a varying subset
of what is possible, and not necessarily in quite the same
On Sat, 26 Feb 2022 at 14:35, Avi Gross via Python-list
wrote:
> But with numpy and more available anyway, it may not be necessary to reinvent
> much of that. I was just wondering if it ever made sense to simply include it
> in the base python, perhaps as a second executable with a name like pyt
> I never knew this. Where can I read more about this origin?
https://python-history.blogspot.com/2009/01/personal-history-part-1-cwi.html?m=1
<>
There are more sources which i cannot remember
from the top of my head
--
https://mail.python.org/mailman/listinfo/python-list
Dennis,
What you describe may be a start but is it anything I might not have easily
created myself? https://docs.python.org/3/library/array.html
I can see creating my own object and adding those methods and attributes while
gaining very little, except perhaps storage.
Can I add or multiply tw
On Sat, 26 Feb 2022 at 03:10, Dennis Lee Bieber wrote:
>
> On Fri, 25 Feb 2022 23:06:57 + (UTC), Avi Gross
> declaimed the following:
>
> >I do have to wonder if anyone ever considered adding back enough
> >functionality into base Python to make some additions less needed. Is there
> >any r
Yes i know that JS has switch from before
I was referring to the pattern matching proposal.
I cannot find the original place i read it from but here's the github one
https://github.com/tc39/proposal-pattern-matching
--
https://mail.python.org/mailman/listinfo/python-list
On Fri, 25 Feb 2022 23:06:57 + (UTC), Avi Gross
declaimed the following:
>I do have to wonder if anyone ever considered adding back enough functionality
>into base Python to make some additions less needed. Is there any reason the
>kind of structures used by so many languages cannot be made
On Fri, 25 Feb 2022 at 23:13, Barry wrote:
>
> > On 25 Feb 2022, at 23:00, Richard Damon wrote:
> >
> > On 2/25/22 2:47 PM, Chris Angelico wrote:
> >>> On Sat, 26 Feb 2022 at 05:49, Richard Damon
> >>> wrote:
> >>> On 2/25/22 4:12 AM, BELAHCENE Abdelkader wrote:
> Hi,
> a lot of peop
On 26/02/22 11:22 am, Chris Angelico wrote:
What's the best language for swearing in? Ah, that one I can't help
you with, although I've heard good things about French. :)
Russian seems to be quite good for it too, judging by
certain dashcam footage channels.
--
Greg
--
https://mail.python.org/
On Sat, 26 Feb 2022 at 10:05, Albert-Jan Roskam wrote:
>Was also thinking about reduce, though this one uses a dunder method:
>from functools import reduce
>d = {1: ['aaa', 'bbb', 'ccc'], 2: ['fff', 'ggg']}
>print(reduce(list.__add__, list(d.values(
If you don't want to use th
> On 25 Feb 2022, at 23:00, Richard Damon wrote:
>
> On 2/25/22 2:47 PM, Chris Angelico wrote:
>>> On Sat, 26 Feb 2022 at 05:49, Richard Damon
>>> wrote:
>>> On 2/25/22 4:12 AM, BELAHCENE Abdelkader wrote:
Hi,
a lot of people think that C (or C++) is faster than python, yes I agree
Is that fair, Grant?
I go back far enough that in my earliest years I was submitting FORTRAN
programs written on punched cards and often getting them back the next day. The
compiling was not the major factor in how long it took.
For many cases, a compiled language only needs to be compiled once
If you don't like the idea of 'adding' strings you can 'concat'enate:
>>> items = [[1,2,3], [4,5], [6]]
>>> functools.reduce(operator.concat, items)
[1, 2, 3, 4, 5, 6]
>>> functools.reduce(operator.iconcat, items, [])
[1, 2, 3, 4, 5, 6]
The latter is the functio
On Sat, 26 Feb 2022 at 09:58, Richard Damon wrote:
>
> On 2/25/22 2:47 PM, Chris Angelico wrote:
> > On Sat, 26 Feb 2022 at 05:49, Richard Damon
> > wrote:
> >> On 2/25/22 4:12 AM, BELAHCENE Abdelkader wrote:
> >>> Hi,
> >>> a lot of people think that C (or C++) is faster than python, yes I agre
On 2/25/22 2:47 PM, Chris Angelico wrote:
On Sat, 26 Feb 2022 at 05:49, Richard Damon wrote:
On 2/25/22 4:12 AM, BELAHCENE Abdelkader wrote:
Hi,
a lot of people think that C (or C++) is faster than python, yes I agree,
but I think that's not the case with numpy, I believe numpy is faster than
On Sat, 26 Feb 2022 at 09:04, Barry Scott wrote:
>
>
>
> > On 25 Feb 2022, at 18:07, Abdur-Rahmaan Janhangeer
> > wrote:
> >
> > Normally people put Python in the scripting category.
> > I learnt typed languages like C++ and Java at first.
> > People who learn languages like these tend to put
>
> On 25 Feb 2022, at 18:07, Abdur-Rahmaan Janhangeer
> wrote:
>
> Normally people put Python in the scripting category.
> I learnt typed languages like C++ and Java at first.
> People who learn languages like these tend to put
> Python in a non-serious category. The post was
> more ironic tha
On 25/02/2022 14.30, 2qdxy4rzwzuui...@potatochowder.com wrote:
On 2022-02-25 at 13:48:32 -0600,
"Michael F. Stemper" wrote:
On 25/02/2022 12.07, Abdur-Rahmaan Janhangeer wrote:
I have been following language feature proposals from various
languages. Some decide to avoid Python's route, but
On Sat, 26 Feb 2022 at 07:32, <2qdxy4rzwzuui...@potatochowder.com> wrote:
>
> On 2022-02-25 at 13:48:32 -0600,
> "Michael F. Stemper" wrote:
>
> > On 25/02/2022 12.07, Abdur-Rahmaan Janhangeer wrote:
>
> > > I have been following language feature proposals from various
> > > languages. Some decide
On 2022-02-25, Richard Damon wrote:
> On 2/25/22 4:12 AM, BELAHCENE Abdelkader wrote:
>> Hi,
>> a lot of people think that C (or C++) is faster than python, yes I agree,
>> but I think that's not the case with numpy, I believe numpy is faster than
>> C, at least in some cases.
>
> My understanding
On 2022-02-25 at 13:48:32 -0600,
"Michael F. Stemper" wrote:
> On 25/02/2022 12.07, Abdur-Rahmaan Janhangeer wrote:
> > I have been following language feature proposals from various
> > languages. Some decide to avoid Python's route, but others have been
> > trying hard to catch up with Python.
On 25/02/2022 12.07, Abdur-Rahmaan Janhangeer wrote:
I have been following language feature proposals from various
languages. Some decide to avoid Python's route,
but others have been trying hard to catch up with Python.
One gleaming example is the switch case. JS recently proposed pattern
match
On Sat, 26 Feb 2022 at 06:44, Avi Gross via Python-list
wrote:
>
> I agree with Richard.
>
> Some people may be confused and think c is the speed of light and
> relativistically speaking, nothing can be faster. (OK, just joking. The uses
> of the same letter of the alphabet are not at all relate
On Sat, 26 Feb 2022 at 05:49, Richard Damon wrote:
>
> On 2/25/22 4:12 AM, BELAHCENE Abdelkader wrote:
> > Hi,
> > a lot of people think that C (or C++) is faster than python, yes I agree,
> > but I think that's not the case with numpy, I believe numpy is faster than
> > C, at least in some cases.
I agree with Richard.
Some people may be confused and think c is the speed of light and
relativistically speaking, nothing can be faster. (OK, just joking. The uses of
the same letter of the alphabet are not at all related. One is named for the
language that came after the one named B, while th
On Sat, 26 Feb 2022 at 03:13, BELAHCENE Abdelkader
wrote:
> *This is the Python3 program :import timeit as itimport numpy as npimport
> systry : n=eval(sys.argv[1])except: print ("needs integer as argument") ;
> exit() a=range(1,n+1)b=np.array(a)def func1(): return sum(a)def
> func2(): return
On Sat, 26 Feb 2022 at 05:16, Robert Latest via Python-list
wrote:
>
> Chris Angelico wrote:
> > Depending on your database, this might be counter-productive. A
> > PostgreSQL database running on localhost, for instance, has its own
> > caching, and data transfers between two apps running on the s
On Sat, 26 Feb 2022 at 05:09, Abdur-Rahmaan Janhangeer
wrote:
>
> Normally people put Python in the scripting category.
You have a very interesting definition of "normal".
ChrisA
--
https://mail.python.org/mailman/listinfo/python-list
On 2/25/22 4:12 AM, BELAHCENE Abdelkader wrote:
Hi,
a lot of people think that C (or C++) is faster than python, yes I agree,
but I think that's not the case with numpy, I believe numpy is faster than
C, at least in some cases.
My understanding is that numpy is written in C, so for it to be fast
Greg Ewing wrote:
> * If more than one thread calls get_data() during the initial
> cache filling, it looks like only one of them will wait for
> the thread -- the others will skip waiting altogether and
> immediately return None.
Right. But that needs to be dealt with somehow. No data is no data.
Chris Angelico wrote:
> Depending on your database, this might be counter-productive. A
> PostgreSQL database running on localhost, for instance, has its own
> caching, and data transfers between two apps running on the same
> computer can be pretty fast. The complexity you add in order to do
> you
Normally people put Python in the scripting category.
I learnt typed languages like C++ and Java at first.
People who learn languages like these tend to put
Python in a non-serious category. The post was
more ironic than litteral.
After 5 years of following the mailing lists i realised
that there
>>> Thanks for the in-between. I really like the Python comunity as,
>>> even though it's a 'scripting' language,
>
> And we like you, even though you're only a ...
>
> In English, a statement like that is considered rather insulting.
>
>> To me, it's a programming language. In my usage, a "scri
On 2022-02-25, Michael F. Stemper wrote:
> On 25/02/2022 06.49, Abdur-Rahmaan Janhangeer wrote:
>
>> Thanks for the in-between. I really like the Python comunity as,
>> even though it's a 'scripting' language,
And we like you, even though you're only a ...
In English, a statement like that is co
On 25/02/2022 06.49, Abdur-Rahmaan Janhangeer wrote:
Thanks for the in-between. I really like the Python comunity as,
even though it's a 'scripting' language,
To me, it's a programming language. In my usage, a "script" is
a bunch of OS commands.
--
Michael F. Stemper
Life's too important to t
On 25/02/22 1:08 am, Robert Latest wrote:
My question is: Is this a solid approach? Am I forgetting something?
I can see a few of problems:
* If more than one thread calls get_data() during the initial
cache filling, it looks like only one of them will wait for
the thread -- the others will sk
Hi,
I am wondering whether SQLAlchemy listen events are appropriate for the
following situation:
I have a table containing users and a table for events related to users
class User(Base):
__tablename__ = "users"
uid = Column('uid', String(64), primary_key=True)
gid = Column('
Hi,
a lot of people think that C (or C++) is faster than python, yes I agree,
but I think that's not the case with numpy, I believe numpy is faster than
C, at least in some cases.
*Is there another explanation ?Or where can find a doc speaking about the
subject?*Thanks a lot
Regards
Numpy imple
Avi solved the captive portal problem above.
It's by comparing the page content to a dynamic
output.
I was asking for wifi just in case i missed
anything we did not yet discuss.
I consider the thread closed, thanks everybody,
it was very fruitful for me.
Thanks for the in-between. I really like
44 matches
Mail list logo