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
96ec38f9
Commit
96ec38f9
authored
7 years ago
by
hhakim
Browse files
Options
Downloads
Patches
Plain Diff
Minor change.
Update API doc for py wrapper.
parent
45fc79d4
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
wrapper/python/pyfaust.py
+6
-5
6 additions, 5 deletions
wrapper/python/pyfaust.py
with
6 additions
and
5 deletions
wrapper/python/pyfaust.py
+
6
−
5
View file @
96ec38f9
...
...
@@ -501,11 +501,11 @@ class Faust:
def
__getitem__
(
F
,
indices
):
"""
Returns a Faust representing a submatrix of F.
Returns a Faust representing a submatrix of
the dense matrix of
F.
This function is a Python built-in overload.
WARNING: this function doesn
'
t handle a slice step
not equal
to 1 (e.g. F[i:j:2,:]
WARNING: this function doesn
'
t handle a slice step
different
to 1 (e.g. F[i:j:2,:]
where slice step is 2.)
Args:
...
...
@@ -535,10 +535,10 @@ class Faust:
>>>
F
[:,
i2
]
# full column i2
>>>
F
[
2
:
4
,
1
:
4
]
# from
line
2 to 3, each
line
containing
>>>
F
[
2
:
4
,
1
:
4
]
# from
row
2 to 3, each
row
containing
# only elements from column 1 to 3
>>>
F
[::,
4
:
-
1
]
# from
line
0 to end
line
, each
line
>>>
F
[::,
4
:
-
1
]
# from
row
0 to end
row
, each
row
# containing only elements from column 4 to
# column before the last one.
...
...
@@ -546,7 +546,8 @@ class Faust:
"""
#TODO: refactor (by index when indices == tuple(2), error message,
# out_indices checking on the end)
#TODO: check that step == 1 on slices and stop on failure if it is
#TODO: check that step == 1 on slices and stop on failure if it is or
# implement negative steps
if
(
indices
==
Ellipsis
):
# F[...]
out_indices
=
[
slice
(
0
,
F
.
shape
[
0
]),
slice
(
0
,
F
.
shape
[
1
])]
elif
(
isinstance
(
indices
,
int
)):
# F[i] # a line
...
...
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