Skip to content
This repository has been archived by the owner on Jan 15, 2024. It is now read-only.

Commit

Permalink
Fix numba.types shim
Browse files Browse the repository at this point in the history
  • Loading branch information
leezu committed Aug 27, 2018
1 parent e7ca34c commit 8de29ec
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions gluonnlp/base.py
Expand Up @@ -42,9 +42,18 @@ def numba_jitclass(spec):
# pylint: disable=unused-argument
return identity

def numba_types(*args, **kwargs):
# pylint: disable=unused-argument
return None
class NumbaTypes(object):
class NumbaType(object):
def __getitem__(self, x):
pass

def __call__(self, *args, **kwargs):
# pylint: disable=unused-argument
pass

def __getattr__(self, attr):
return self.NumbaType()

numba_types = NumbaTypes()
numba_njit = identity
numba_prange = range

0 comments on commit 8de29ec

Please sign in to comment.