Skip to content

Commit bd1a441

Browse files
authored
Delay unnecessary import. (#56)
* delay import * lint
1 parent 4820d65 commit bd1a441

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

onnx_array_api/npx/npx_functions.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
from typing import Tuple, Union
2-
import array_api_compat.numpy as np_array_api
32
import numpy as np
43
from onnx import FunctionProto, ModelProto, NodeProto, TensorProto
54
from onnx.helper import make_tensor, tensor_dtype_to_np_dtype
@@ -624,6 +623,8 @@ def isdtype(
624623
See :epkg:`BaseArrayAPI:isdtype`.
625624
This function is not converted into an onnx graph.
626625
"""
626+
import array_api_compat.numpy as np_array_api
627+
627628
if isinstance(dtype, DType):
628629
dti = tensor_dtype_to_np_dtype(dtype.code)
629630
return np_array_api.isdtype(dti, kind)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy