Skip to content
This repository was archived by the owner on Feb 2, 2024. It is now read-only.

Conversation

@kozlov-alexey
Copy link
Contributor

Motivation: there's no easy way to create Numba LiteralStrKeyDict
objects for const dicts with many elements. This adds a special overload
for dict builtin that creates LiteralStrKeyDict from tuple of pairs
('col_name', col_data).

@pep8speaks
Copy link

pep8speaks commented Nov 9, 2021

Hello @kozlov-alexey! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2021-11-17 17:46:11 UTC

Motivation: there's no easy way to create Numba LiteralStrKeyDict
objects for const dicts with many elements. This adds a special overload
for dict builtin that creates LiteralStrKeyDict from tuple of pairs
('col_name', col_data).
@kozlov-alexey kozlov-alexey force-pushed the feature/add_literal_dict_utils branch from b369520 to 4f3f7e5 Compare November 11, 2021 01:27
Details: zip builtin is already overloaded in Numba and has priority
over user defined overloads, hence in cases when we want zip two single
elements tuples, e.g. zip(('A', ), (1, )) builtin function will match
and type inference will unliteral all tuples, producing iter objects
(that are always homogeneous in Numba). That is, literality of objects
will be lost. Using sdc_zip_tuples explicitly avoid this problem.
@kozlov-alexey kozlov-alexey merged commit 5ff3b16 into IntelPython:master Nov 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants