Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Are numpy, opencv, scipy, pandas, etc which are wrappers for compilied implementations "builtins"? #76

Closed
drjasonharrison opened this issue Mar 11, 2021 · 2 comments

Comments

@drjasonharrison
Copy link

Wondering when a function is treated as a "builtin". Are numpy, opencv, scipy, pandas, etc which are wrappers for compilied implementations "builtins"?

There is a note to run a manual test using scipy/numpy, but I cannot find a tests script or further details:
https://github.com/sumerc/yappi/blob/master/tests/manual_tests.txt

This test uses "yappi.start(builtins=True)" when using testing "old style co-routines" with asyncio, but not for all asyncio tests:
https://github.com/sumerc/yappi/blob/master/tests/test_asyncio.py

@sumerc
Copy link
Owner

sumerc commented Mar 15, 2021

A builtin function means any function that is implemented in C API. Any standard library function that is implemented on a C extension (for example: time.sleep is implemented in a C module) or any 3rd party C extension function.

So, coming to your original question: I assume there are lots of builtin functions in these libraries(numpy, scipy, pandas) as there are lots of code implemented in C.

Just for reference, for more information on what functions are builtins, this is where it is defined in CPython: (PYCfunctionObject struct) https://github.com/python/cpython/blob/0ab152c6b5d95caa2dc1a30fa96e10258b5f188e/Objects/methodobject.c#L44

@sumerc
Copy link
Owner

sumerc commented Mar 23, 2021

Assuming the answer make sense for you! Closing the issue for now, pls do not hesitate to re-open if there is still any unclear points.

@sumerc sumerc closed this as completed Mar 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants