Skip to content

Commit

Permalink
BENCH: don't fail at import time with old Numpy
Browse files Browse the repository at this point in the history
  • Loading branch information
pv committed Jan 1, 2019
1 parent 1a43137 commit e4b46cd
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion benchmarks/benchmarks/bench_overrides.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@

from .common import Benchmark

from numpy.core.overrides import array_function_dispatch
try:
from numpy.core.overrides import array_function_dispatch
except ImportError:
# Don't fail at import time with old Numpy versions
def array_function_dispatch(*args, **kwargs):
def wrap(*args, **kwargs):
return None
return wrap

import numpy as np


Expand Down

0 comments on commit e4b46cd

Please sign in to comment.