Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
grudge
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Andreas Klöckner
grudge
Merge requests
!54
Do not add InterpolationOperator around constants
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Do not add InterpolationOperator around constants
no-interp-constants
into
master
Overview
4
Commits
3
Pipelines
7
Changes
2
Merged
Alexandru Fikl
requested to merge
no-interp-constants
into
master
4 years ago
Overview
4
Commits
3
Pipelines
7
Changes
4
Expand
Is this a good idea? It mostly just annoyed me when stringifying an expression.
0
0
Merge request reports
Compare
version 4
version 6
52fbf4ed
4 years ago
version 5
f900dc7a
4 years ago
version 4
ee4d927b
4 years ago
version 3
8dc94bf4
4 years ago
version 2
41cea2f0
4 years ago
version 1
6c0e4ffb
4 years ago
master (base)
and
latest version
latest version
22dff13d
3 commits,
4 years ago
version 6
52fbf4ed
2 commits,
4 years ago
version 5
f900dc7a
2 commits,
4 years ago
version 4
ee4d927b
1 commit,
4 years ago
version 3
8dc94bf4
1 commit,
4 years ago
version 2
41cea2f0
2 commits,
4 years ago
version 1
6c0e4ffb
1 commit,
4 years ago
Show latest version
4 files
+
67
−
7
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
4
Search (e.g. *.vue) (Ctrl+P)
grudge/symbolic/operators.py
+
3
−
1
Options
@@ -152,9 +152,11 @@ class InterpolationOperator(Operator):
from
pytools.obj_array
import
with_object_array_or_scalar
def
interp_one
(
subexpr
):
from
pymbolic.primitives
import
is_constant
if
self
.
dd_in
==
self
.
dd_out
:
# no-op interpolation, go away
return
subexpr
elif
is
i
nstan
ce
(
subexpr
,
(
int
,
float
,
complex
,
np
.
number
)
):
elif
is
_co
nstan
t
(
subexpr
):
return
subexpr
else
:
from
grudge.symbolic.primitives
import
OperatorBinding
Loading