Returns a dictionary of array module names paired to their entry points A convenience wrapper for importlib.metadata.entry_points(). It has the added benefit of working with both the original dict interface and the new select interface, so this can be used warning-free in all modern Pyt
()
| 35 | |
| 36 | |
| 37 | def installed_array_modules() -> dict[str, EntryPoint]: |
| 38 | """Returns a dictionary of array module names paired to their entry points |
| 39 | |
| 40 | A convenience wrapper for importlib.metadata.entry_points(). It has the |
| 41 | added benefit of working with both the original dict interface and the new |
| 42 | select interface, so this can be used warning-free in all modern Python |
| 43 | versions. |
| 44 | """ |
| 45 | return {ep.name: ep for ep in entry_points(group="array_api")} |
| 46 | |
| 47 | |
| 48 | def flushes_to_zero(xp, width: Literal[32, 64]) -> bool: |