question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

numpy ufuncs don't have __qualname__

See original GitHub issue

Numpy ufuncs have a __name__, but don’t have a __qualname__ as defined in PEP 3155. Similarly, they don’t seem to define a __module__. (note that for numpy’s builtin ufuncs, the __qualname__ should simply be the same as the __name__, e.g. np.sin.__qualname__ == 'sin')

Issue Analytics

  • State:open
  • Created 9 years ago
  • Comments:29 (27 by maintainers)

github_iconTop GitHub Comments

2reactions
pitroucommented, Jan 27, 2015

Well, I’m the author of the PEP.

1reaction
sebergcommented, Sep 21, 2021

__name__ attributes don’t contain periods, and __qualname__ only does so in the case of methods i.e. irrelevant in the case of ufuncs

This is not irrelevant, because a ufunc can be attached to a different object (and this can be the only place it lives). Numba does this. (It is irrelevant for NumPy or SciPy, but not generally.)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Universal functions (ufunc) — NumPy v1.24 Manual
A universal function (or ufunc for short) is a function that operates on ndarrays in an element-by-element fashion, supporting array broadcasting, ...
Read more >
NumPy в Twitter: „@__qualname__ @teoliphant 3/8 pygeos does ...
Does anyone know how to implement a user-defined numpy dtype for types with non-trivial destructors? I'm trying to make a dtype for: struct...
Read more >
2046668 – numpy fails to build with Python 3.11: error
Bug 2046668 - numpy fails to build with Python 3.11: error: ... Future ufuncs should # possible add a specific qualname, or a...
Read more >
core/__init__.py · jeris/numpy - Gemfury
Contains the core of NumPy: ndarray, ufuncs, dtypes, etc. Please note that this module ... We have compiled some common reasons and troubleshooting...
Read more >
__init__.py - " Contains the core of NumPy: ndarray, ufuncs ...
Contains the core of NumPy: ndarray, ufuncs, dtypes, etc. ... make sense to add a `__qualname__` to ufuncs, to allow this more# explicitly...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found