Skip to content
Snippets Groups Projects
Commit 740b3fa5 authored by Frederik Hennig's avatar Frederik Hennig
Browse files

fix test_type_cast

parent 44b5a366
Branches
Tags
1 merge request!443Extended Support for Typing in the Symbolic Toolbox
Pipeline #72624 passed
......@@ -207,10 +207,11 @@ class BoolCast(TypeCast, Boolean):
tcast = TypeCast
class CastFunc(sp.Function):
class CastFunc(TypeCast):
def __new__(cls, *args, **kwargs):
warn(
"CastFunc is deprecated and will be removed in pystencils 2.1. "
"Use `pystencils.tcast` instead.",
FutureWarning
)
return TypeCast.__new__(cls, *args, **kwargs)
......@@ -8,7 +8,7 @@ from pystencils import (
Assignment,
Field,
)
from pystencils.sympyextensions.typed_sympy import CastFunc
from pystencils.sympyextensions.typed_sympy import tcast
AVAIL_TARGETS_NO_SSE = [t for t in Target.available_targets() if Target._SSE not in t]
......@@ -55,7 +55,7 @@ def test_type_cast(gen_config, xp, from_type, to_type):
inp_field = Field.create_from_numpy_array("inp", inp)
outp_field = Field.create_from_numpy_array("outp", outp)
asms = [Assignment(outp_field.center(), CastFunc(inp_field.center(), to_type))]
asms = [Assignment(outp_field.center(), tcast(inp_field.center(), to_type))]
kernel = create_kernel(asms, gen_config)
kfunc = kernel.compile()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment