Closed cdepillabout closed 4 years ago
Thanks for the report, this is indeed a mistake and a failure with the current CI setup. For fixing this particular issue I believe we can replace with with np.random.choice
. I think this is 1-1, @jcmgray can you comment?
We are due for a release so we should be able to patch this up and get a release out in the next few days.
Yep I can fix this shortly - the reason to use random.choices
is speed, so if there are no objections I'll try and import that version first then resort to numpy.
The
setup.py
file setspython_requires='>=3.5'
:https://github.com/dgasmith/opt_einsum/blob/4323cfce5f415dc425143f216171cefa56d5d429/setup.py#L25
However,
opt_einsum
is usingrandom.choices
, which is only available on>=python-3.6
:https://github.com/dgasmith/opt_einsum/blob/4323cfce5f415dc425143f216171cefa56d5d429/opt_einsum/path_random.py#L263
random.choices
api docs: https://docs.python.org/3/library/random.html#random.choicesAlso, as far as I can tell, travis is attempting to test with
python-3.5
:https://github.com/dgasmith/opt_einsum/blob/4323cfce5f415dc425143f216171cefa56d5d429/.travis.yml#L12
https://github.com/dgasmith/opt_einsum/blob/4323cfce5f415dc425143f216171cefa56d5d429/.travis.yml#L21-L24
But these tests are actually running with
python-3.6
: