dmlc / minpy

NumPy interface with mixed backend execution
https://minpy.readthedocs.io/en/latest/
Other
1.11k stars 112 forks source link

Update __init__.py #166

Closed wangg12 closed 7 years ago

wangg12 commented 7 years ago

fix mxnet version check like '0.9.3a3'

lryta commented 7 years ago

What about changing it to

import re
...
current = tuple(int(re.match(r'^\d+',v).group()) for v in mx.__version__.split("."))

It is possible to have 0.10.11a8.

wangg12 commented 7 years ago

@lryta You are right.

lryta commented 7 years ago

It looks like lint fails. Please add a space between r'^\d+' and v:

re.match(r'^\d+',v) => re.match(r'^\d+', v)

lryta commented 7 years ago

Thank you!