-
-
Notifications
You must be signed in to change notification settings - Fork 189
Closed
Labels
Milestone
Description
dill.source.getsource correctly identifies numpy scalars, but doesn't create them, and instead returns the python equivalent. Should apply code to cast to the appropriate dtype.
$ python
Python 3.8.20 (default, Sep 7 2024, 10:50:45)
[Clang 13.1.6 (clang-1316.0.21.2.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import dill
>>> import numpy
>>> oo = 0
>>> ll = numpy.int64(1)
>>> print(dill.source.getsource(oo, force=True))
0
>>> print(dill.source.getsource(ll, force=True))
from numpy import int64
1
>>>
Reactions are currently unavailable