Implement type
key-word-argument for numba.typed.List
constructor
#5873
Labels
Projects
type
key-word-argument for numba.typed.List
constructor
#5873
Since the inception of the
numba.typed.List
theList.empty_list
factory method has been a crutch to get the code working. Originally, it was supposed to be calledList.empty
-- however due to "reasons" this caused a conflict withnumba.typed.Dict.empty
(investigation to follow) and so it now has it's current unwieldy form.Now that
numba.typed.List
has a way to be initialized in a Pythonic fashion from an iterable (see: #5294), it would be nice to allow the constructor to taketype
(ortyp
ortype_
to avoid naming conflicts?) as a keyword argument, so as to allow manual specification of the types. As outlined in #5716 the API would look something like:In addition, we may want to deprecate/rename
empty_list
to_empty_list
since it will probably still be used under the hood. And also, some parts of the code-base may need to be updated to reflect this change. Lastly the documentation will need to be scanned and potentially updated to reflect the changes.Note: this should also be made compatible with
NUMBA_DISABLE_JIT
as in this case, the keyword argument will just be ignore and a regular Python list will be returned.The text was updated successfully, but these errors were encountered: