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
itischler
lbmpy
Commits
c97e4589
Commit
c97e4589
authored
Aug 06, 2020
by
Markus Holzer
Browse files
changed order of expected expressions in moments.py
parent
956c5c44
Changes
1
Hide whitespace changes
Inline
Side-by-side
lbmpy/moments.py
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
])
...
...
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