Skip to content

Commit

Permalink
Update dependency_check.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Routhleck committed May 8, 2024
1 parent e9c21a4 commit bafc425
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions brainpy/_src/dependency_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,10 @@ def import_taichi(error_if_not_found=True):

if taichi is None:
return None
if taichi.__version__[0] >= _minimal_taichi_version[0] and taichi.__version__[1] >= _minimal_taichi_version[1] and \
taichi.__version__[2] >= _minimal_taichi_version[2]:
taichi_version = taichi.__version__[0] * 10000 + taichi.__version__[1] * 100 + taichi.__version__[2]
minimal_taichi_version = _minimal_taichi_version[0] * 10000 + _minimal_taichi_version[1] * 100 + \
_minimal_taichi_version[2]
if taichi_version >= minimal_taichi_version:
return taichi
else:
raise ModuleNotFoundError(taichi_install_info)
Expand Down Expand Up @@ -184,4 +186,4 @@ def import_brainpylib_gpu_ops():
raise ImportError('Please install GPU version of brainpylib. \n'
'See https://brainpy.readthedocs.io for installation instructions.')

return brainpylib_gpu_ops
return brainpylib_gpu_ops

0 comments on commit bafc425

Please sign in to comment.