Skip to content

Commit a352ed0

Browse files
committed
fix documentation and upgrade version
1 parent 5a5921b commit a352ed0

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

_doc/examples/plot_benchmark_rf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ def measure_inference(fct, X, repeat, max_time=5, quantile=1):
126126
# model for a random forest and onnxruntime after it was converted
127127
# into ONNX and for the following configurations.
128128

129-
small = cpu_count() < 12
129+
small = cpu_count() < 25
130130
if small:
131131
N = 1000
132132
n_features = 10

onnx_array_api/array_api/_onnx_common.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
from typing import Any, Optional
22
import numpy as np
33
from onnx import TensorProto
4-
import array_api_strict
4+
5+
try:
6+
import array_api_strict
7+
except ImportError:
8+
array_api_strict = None
59

610
from ..npx.npx_types import (
711
DType,
@@ -27,7 +31,7 @@
2731
)
2832

2933

30-
Array = type(array_api_strict.ones((1,)))
34+
Array = type(array_api_strict.ones((1,))) if array_api_strict else None
3135

3236

3337
# These functions with no specific code do not have to be

0 commit comments

Comments
 (0)