import numpy as np import foo from transonic import Transonic, Type, NDim, Array T = Type(float, complex) N = NDim(1, 2) A = Array[T, N] A1 = Array[T, N + 1] ts = Transonic() class MyClass: def __init__(self, a, b): self.a = a self.b = b def compute(self, n): a = self.a b = self.b if ts.is_transpiled: result = ts.use_block("block0") else: # transonic block ( # A a; A1 b; # float n # )
def test_use_pythran_false(): Transonic(use_transonified=False)