Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bob
bob.io.stream
Commits
02f5832d
Commit
02f5832d
authored
Sep 20, 2020
by
David GEISSBUHLER
Browse files
saving ok (preliminary version) and filter now inherit parent name
parent
4fc1f5bf
Pipeline
#42923
failed with stage
in 12 minutes and 24 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
api_test.py
View file @
02f5832d
...
...
@@ -132,7 +132,6 @@ stream0.put(data_a[0])
fo
=
StreamFile
(
'api_test2.h5'
,
mode
=
'w'
)
stream
=
Stream
(
'test'
)
save_filter
=
stream
.
save
(
fo
)
print
(
save_filter
.
name
)
for
i
in
range
(
data_a
.
shape
[
0
]):
stream
.
put
(
data_a
[
i
])
...
...
@@ -141,7 +140,7 @@ for i in range(data_a.shape[0]):
fi
=
StreamFile
(
'api_test2.h5'
,
mode
=
'r'
)
stream
=
Stream
(
'test'
,
fi
)
data
=
stream
.
load
()
print
(
data
.
shape
)
assert
(
np
.
array_equal
(
data
,
data_a
)
)
###########
...
...
bob/io/stream/stream.py
View file @
02f5832d
...
...
@@ -228,7 +228,8 @@ def stream_filter(name):
class
StreamFilter
(
Stream
):
def
__init__
(
self
,
name
,
parent
,
process_frame
=
None
):
self
.
__process_frame
=
process_frame
super
().
__init__
(
name
=
name
,
parent
=
parent
)
self
.
filter_name
=
name
super
().
__init__
(
name
=
parent
.
name
,
parent
=
parent
)
def
process
(
self
,
data
,
indices
):
assert
isinstance
(
indices
,
list
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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