Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
lbmpy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pycodegen
lbmpy
Commits
c97e4589
Commit
c97e4589
authored
4 years ago
by
Markus Holzer
Browse files
Options
Downloads
Patches
Plain Diff
changed order of expected expressions in moments.py
parent
956c5c44
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!38
Update conftest and readme
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lbmpy/moments.py
+3
-3
3 additions, 3 deletions
lbmpy/moments.py
with
3 additions
and
3 deletions
lbmpy/moments.py
+
3
−
3
View file @
c97e4589
...
...
@@ -456,7 +456,7 @@ def extract_monomials(sequence_of_polynomials, dim=3):
>>>
extract_monomials
([
x
**
2
+
y
**
2
+
y
,
y
+
y
**
2
])
{(
0
,
2
,
0
),
(
0
,
1
,
0
),
(
2
,
0
,
0
)}
>>>
extract_monomials
([
x
**
2
+
y
**
2
+
y
,
y
+
y
**
2
],
dim
=
2
)
{(
0
,
1
),
(
2
,
0
),
(
0
,
2
)}
{(
0
,
1
),
(
0
,
2
),
(
2
,
0
)}
"""
monomials
=
set
()
for
polynomial
in
sequence_of_polynomials
:
...
...
@@ -479,8 +479,8 @@ def monomial_to_polynomial_transformation_matrix(monomials, polynomials):
>>>
mons
=
list
(
extract_monomials
(
polys
,
dim
=
2
))
>>>
monomial_to_polynomial_transformation_matrix
(
mons
,
polys
)
Matrix
([
[
7
,
3
,
2
],
[
9
,
-
5
,
0
]])
[
3
,
2
,
7
],
[
-
5
,
0
,
9
]])
"""
dim
=
len
(
monomials
[
0
])
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment