Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
faust
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
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
faust group
faust
Commits
dedcff69
Commit
dedcff69
authored
1 year ago
by
hhakim
Browse files
Options
Downloads
Patches
Plain Diff
Update poly docstring examples (#332).
parent
83f90190
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Pipeline
#968691
passed
1 year ago
Stage: test
Stage: pkg_purepy
Stage: pkg
Stage: pkg_test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+1
-1
1 addition, 1 deletion
.gitlab-ci.yml
wrapper/python/pyfaust/poly.py
+24
-24
24 additions, 24 deletions
wrapper/python/pyfaust/poly.py
with
25 additions
and
25 deletions
.gitlab-ci.yml
+
1
−
1
View file @
dedcff69
...
@@ -166,7 +166,7 @@ ctest_nightly_win10:
...
@@ -166,7 +166,7 @@ ctest_nightly_win10:
-
build_FaustWin/Testing
# cmake configure, build, ctest logs
-
build_FaustWin/Testing
# cmake configure, build, ctest logs
.install_pyfaust_release_and_update
:
.install_pyfaust_release_and_update
:
variables
:
{
JOB_PYTHON
:
'
python3.12'
}
variables
:
{
JOB_PYTHON
:
'
python3.12'
}
# see #332, why not python3.12
before_script
:
before_script
:
-
if [[ ! -d 'build' ]]; then mkdir build;fi; cd build
-
if [[ ! -d 'build' ]]; then mkdir build;fi; cd build
-
cmake -DBUILD_WRAPPER_PYTHON=ON -DREMOTE_DATA_URL="$DURL" -DREMOTE_DATA_FILE="$DFILE" ..
-
cmake -DBUILD_WRAPPER_PYTHON=ON -DREMOTE_DATA_URL="$DURL" -DREMOTE_DATA_FILE="$DFILE" ..
...
...
This diff is collapsed.
Click to expand it.
wrapper/python/pyfaust/poly.py
+
24
−
24
View file @
dedcff69
...
@@ -121,10 +121,10 @@ def basis(L, K, basis_name, dev='cpu', T0=None, **kwargs):
...
@@ -121,10 +121,10 @@ def basis(L, K, basis_name, dev='cpu', T0=None, **kwargs):
>>>
K
=
3
>>>
K
=
3
>>>
F
=
basis
(
L
,
K
,
'
chebyshev
'
)
>>>
F
=
basis
(
L
,
K
,
'
chebyshev
'
)
>>>
F
>>>
F
Faust
size
200
x50
,
density
0.06
72
,
nnz_sum
6
72
,
4
factor
(
s
):
Faust
size
200
x50
,
density
0.06
99
,
nnz_sum
6
99
,
4
factor
(
s
):
-
FACTOR
0
(
double
)
SPARSE
,
size
200
x150
,
density
0.009
1
3333
,
nnz
2
74
-
FACTOR
0
(
double
)
SPARSE
,
size
200
x150
,
density
0.009
4
3333
,
nnz
2
83
-
FACTOR
1
(
double
)
SPARSE
,
size
150
x100
,
density
0.01
49
333
,
nnz
2
24
-
FACTOR
1
(
double
)
SPARSE
,
size
150
x100
,
density
0.01
55
333
,
nnz
2
33
-
FACTOR
2
(
double
)
SPARSE
,
size
100
x50
,
density
0.02
48
,
nnz
1
24
-
FACTOR
2
(
double
)
SPARSE
,
size
100
x50
,
density
0.02
66
,
nnz
1
33
-
FACTOR
3
(
double
)
SPARSE
,
size
50
x50
,
density
0.02
,
nnz
50
-
FACTOR
3
(
double
)
SPARSE
,
size
50
x50
,
density
0.02
,
nnz
50
identity
matrix
flag
identity
matrix
flag
...
@@ -133,11 +133,11 @@ def basis(L, K, basis_name, dev='cpu', T0=None, **kwargs):
...
@@ -133,11 +133,11 @@ def basis(L, K, basis_name, dev='cpu', T0=None, **kwargs):
>>>
G
=
next
(
F
)
>>>
G
=
next
(
F
)
>>>
G
>>>
G
Faust
size
250
x50
,
density
0.0
7968
,
nnz_sum
996
,
5
factor
(
s
):
Faust
size
250
x50
,
density
0.0
8256
,
nnz_sum
1032
,
5
factor
(
s
):
-
FACTOR
0
(
double
)
SPARSE
,
size
250
x200
,
density
0.006
48
,
nnz
3
24
-
FACTOR
0
(
double
)
SPARSE
,
size
250
x200
,
density
0.006
66
,
nnz
3
33
-
FACTOR
1
(
double
)
SPARSE
,
size
200
x150
,
density
0.009
1
3333
,
nnz
2
74
-
FACTOR
1
(
double
)
SPARSE
,
size
200
x150
,
density
0.009
4
3333
,
nnz
2
83
-
FACTOR
2
(
double
)
SPARSE
,
size
150
x100
,
density
0.01
49
333
,
nnz
2
24
-
FACTOR
2
(
double
)
SPARSE
,
size
150
x100
,
density
0.01
55
333
,
nnz
2
33
-
FACTOR
3
(
double
)
SPARSE
,
size
100
x50
,
density
0.02
48
,
nnz
1
24
-
FACTOR
3
(
double
)
SPARSE
,
size
100
x50
,
density
0.02
66
,
nnz
1
33
-
FACTOR
4
(
double
)
SPARSE
,
size
50
x50
,
density
0.02
,
nnz
50
-
FACTOR
4
(
double
)
SPARSE
,
size
50
x50
,
density
0.02
,
nnz
50
identity
matrix
flag
identity
matrix
flag
...
@@ -150,10 +150,10 @@ def basis(L, K, basis_name, dev='cpu', T0=None, **kwargs):
...
@@ -150,10 +150,10 @@ def basis(L, K, basis_name, dev='cpu', T0=None, **kwargs):
>>>
F2
=
basis
(
L
,
K
,
'
chebyshev
'
,
T0
=
random
(
50
,
2
,
.
3
,
format
=
'
csr
'
))
>>>
F2
=
basis
(
L
,
K
,
'
chebyshev
'
,
T0
=
random
(
50
,
2
,
.
3
,
format
=
'
csr
'
))
>>>
F2
>>>
F2
Faust
size
200
x2
,
density
1.
68
,
nnz_sum
6
72
,
4
factor
(
s
):
Faust
size
200
x2
,
density
1.
7475
,
nnz_sum
6
99
,
4
factor
(
s
):
-
FACTOR
0
(
double
)
SPARSE
,
size
200
x150
,
density
0.009
1
3333
,
nnz
2
74
-
FACTOR
0
(
double
)
SPARSE
,
size
200
x150
,
density
0.009
4
3333
,
nnz
2
83
-
FACTOR
1
(
double
)
SPARSE
,
size
150
x100
,
density
0.01
49
333
,
nnz
2
24
-
FACTOR
1
(
double
)
SPARSE
,
size
150
x100
,
density
0.01
55
333
,
nnz
2
33
-
FACTOR
2
(
double
)
SPARSE
,
size
100
x50
,
density
0.02
48
,
nnz
1
24
-
FACTOR
2
(
double
)
SPARSE
,
size
100
x50
,
density
0.02
66
,
nnz
1
33
-
FACTOR
3
(
double
)
SPARSE
,
size
50
x2
,
density
0.5
,
nnz
50
-
FACTOR
3
(
double
)
SPARSE
,
size
50
x2
,
density
0.5
,
nnz
50
"""
"""
...
@@ -216,11 +216,11 @@ def poly(coeffs, basis='chebyshev', L=None, X=None, dev='cpu', out=None,
...
@@ -216,11 +216,11 @@ def poly(coeffs, basis='chebyshev', L=None, X=None, dev='cpu', out=None,
>>>
coeffs
=
np
.
array
([.
5
,
1
,
2
,
3
])
>>>
coeffs
=
np
.
array
([.
5
,
1
,
2
,
3
])
>>>
G
=
poly
(
coeffs
,
'
chebyshev
'
,
L
)
>>>
G
=
poly
(
coeffs
,
'
chebyshev
'
,
L
)
>>>
G
>>>
G
Faust
size
50
x50
,
density
0.3
488
,
nnz_sum
8
72
,
5
factor
(
s
):
Faust
size
50
x50
,
density
0.3
596
,
nnz_sum
8
99
,
5
factor
(
s
):
-
FACTOR
0
(
double
)
SPARSE
,
size
50
x200
,
density
0.02
,
nnz
200
-
FACTOR
0
(
double
)
SPARSE
,
size
50
x200
,
density
0.02
,
nnz
200
-
FACTOR
1
(
double
)
SPARSE
,
size
200
x150
,
density
0.009
1
3333
,
nnz
2
74
-
FACTOR
1
(
double
)
SPARSE
,
size
200
x150
,
density
0.009
4
3333
,
nnz
2
83
-
FACTOR
2
(
double
)
SPARSE
,
size
150
x100
,
density
0.01
49
333
,
nnz
2
24
-
FACTOR
2
(
double
)
SPARSE
,
size
150
x100
,
density
0.01
55
333
,
nnz
2
33
-
FACTOR
3
(
double
)
SPARSE
,
size
100
x50
,
density
0.02
48
,
nnz
1
24
-
FACTOR
3
(
double
)
SPARSE
,
size
100
x50
,
density
0.02
66
,
nnz
1
33
-
FACTOR
4
(
double
)
SPARSE
,
size
50
x50
,
density
0.02
,
nnz
50
-
FACTOR
4
(
double
)
SPARSE
,
size
50
x50
,
density
0.02
,
nnz
50
identity
matrix
flag
identity
matrix
flag
...
@@ -231,11 +231,11 @@ def poly(coeffs, basis='chebyshev', L=None, X=None, dev='cpu', out=None,
...
@@ -231,11 +231,11 @@ def poly(coeffs, basis='chebyshev', L=None, X=None, dev='cpu', out=None,
>>>
coeffs
=
np
.
array
([.
5
,
1
,
2
,
3
])
>>>
coeffs
=
np
.
array
([.
5
,
1
,
2
,
3
])
>>>
G
=
poly
(
coeffs
,
F
)
>>>
G
=
poly
(
coeffs
,
F
)
>>>
G
>>>
G
Faust
size
50
x50
,
density
0.3
488
,
nnz_sum
8
72
,
5
factor
(
s
):
Faust
size
50
x50
,
density
0.3
596
,
nnz_sum
8
99
,
5
factor
(
s
):
-
FACTOR
0
(
double
)
SPARSE
,
size
50
x200
,
density
0.02
,
nnz
200
-
FACTOR
0
(
double
)
SPARSE
,
size
50
x200
,
density
0.02
,
nnz
200
-
FACTOR
1
(
double
)
SPARSE
,
size
200
x150
,
density
0.009
1
3333
,
nnz
2
74
-
FACTOR
1
(
double
)
SPARSE
,
size
200
x150
,
density
0.009
4
3333
,
nnz
2
83
-
FACTOR
2
(
double
)
SPARSE
,
size
150
x100
,
density
0.01
49
333
,
nnz
2
24
-
FACTOR
2
(
double
)
SPARSE
,
size
150
x100
,
density
0.01
55
333
,
nnz
2
33
-
FACTOR
3
(
double
)
SPARSE
,
size
100
x50
,
density
0.02
48
,
nnz
1
24
-
FACTOR
3
(
double
)
SPARSE
,
size
100
x50
,
density
0.02
66
,
nnz
1
33
-
FACTOR
4
(
double
)
SPARSE
,
size
50
x50
,
density
0.02
,
nnz
50
-
FACTOR
4
(
double
)
SPARSE
,
size
50
x50
,
density
0.02
,
nnz
50
identity
matrix
flag
identity
matrix
flag
...
@@ -601,9 +601,9 @@ def expm_multiply(A, B, t, K=10, tradeoff='time', dev='cpu', **kwargs):
...
@@ -601,9 +601,9 @@ def expm_multiply(A, B, t, K=10, tradeoff='time', dev='cpu', **kwargs):
>>>
t
=
np
.
linspace
(
start
=-
.
5
,
stop
=-
0.1
,
num
=
3
,
endpoint
=
True
)
>>>
t
=
np
.
linspace
(
start
=-
.
5
,
stop
=-
0.1
,
num
=
3
,
endpoint
=
True
)
>>>
y
=
fexpm_multiply
(
L
,
x
,
t
)
>>>
y
=
fexpm_multiply
(
L
,
x
,
t
)
>>>
y
>>>
y
array
([[
0.12706927
,
0.2
4591891
,
0.24529726
,
0.35223879
,
0.7409274
],
array
([[
0.12706927
,
0.2
1111065
,
0.36636184
,
0.41736344
,
0.78517596
],
[
0.13190047
,
0.2
6391877
,
0.2890644
,
0.38977573
,
0.75815737
],
[
0.13190047
,
0.2
4040598
,
0.36636184
,
0.4324354
,
0.78517596
],
[
0.13691536
,
0.2
8256865
,
0.33890501
,
0.43252159
,
0.77600955
]])
[
0.13691536
,
0.2
7376655
,
0.36636184
,
0.44805164
,
0.78517596
]])
"""
"""
if not isinstance(A, csr_matrix):
if not isinstance(A, csr_matrix):
...
...
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