Lines Matching refs:np
12 import numpy as np namespace
41 (np.float64, ir.F64Type.get(context=context)),
42 (np.float32, ir.F32Type.get(context=context)),
43 (np.int64, ir.IntegerType.get_signless(64, context=context)),
44 (np.int32, ir.IntegerType.get_signless(32, context=context)),
45 (np.int16, ir.IntegerType.get_signless(16, context=context)),
46 (np.int8, ir.IntegerType.get_signless(8, context=context)),
51 def dtype_to_irtype(self, dtype: np.dtype) -> ir.Type:
65 def irtype_to_dtype(self, tp: ir.Type) -> np.dtype:
67 return np.dtype(self.irtype_to_sctype(tp))
76 def get_RankedTensorType_of_nparray(self, nparray: np.ndarray) -> ir.RankedTensorType:
151 def run(self, np_arg0: np.ndarray) -> np.ndarray:
158 np_out = np.zeros(np_arg0.shape, dtype=np_arg0.dtype)
235 np_arg0 = np.arange(size, dtype=tyconv.irtype_to_dtype(f64)).reshape(*shape)
241 if np.allclose(np_out, np_arg0):