C is it always faster than nump?

Avi Gross avigross at verizon.net
Fri Feb 25 22:33:58 EST 2022


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 two such items efficiently if it contains a numeric value? Can I offer them as an argument to all kinds of functions which can now handle it well? How does it work if a second operand is a scalar or an array of another data type. Can two be compared and result in an array of boolean (not seen in the list of types). Numpy does quite a bit of that kind of thing but perhaps better is a language like R where all that and more are built in. 

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 pythonn to signify that it is more numeric. So if you run that, you know you do not need to add an assortment of modules. I keep seeing programs that just automatically add numpy and pandas and various graphic modules and other scientific and machine learning modules. Of course not everyone needs or even wants this. Many simply use base Python techniques even if they are low for larger amounts of data.





More information about the Python-list mailing list