Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Jonas Plewinski
pystencils
Commits
869d901a
Commit
869d901a
authored
Aug 29, 2019
by
Stephan Seitz
Browse files
Restore previous behavior of get_type_of_expression for untyped symbol
parent
43f6d5de
Changes
1
Hide whitespace changes
Inline
Side-by-side
pystencils/data_types.py
View file @
869d901a
...
...
@@ -436,8 +436,10 @@ def get_type_of_expression(expr,
elif
isinstance
(
expr
,
TypedSymbol
):
return
expr
.
dtype
elif
isinstance
(
expr
,
sp
.
Symbol
):
return
symbol_type_dict
[
expr
.
name
]
# raise ValueError("All symbols iside this expression have to be typed! ", str(expr))
if
symbol_type_dict
:
return
symbol_type_dict
[
expr
.
name
]
else
:
raise
ValueError
(
"All symbols inside this expression have to be typed! "
,
str
(
expr
))
elif
isinstance
(
expr
,
cast_func
):
return
expr
.
args
[
1
]
elif
isinstance
(
expr
,
(
vec_any
,
vec_all
)):
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment