Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
MLAir
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
Container registry
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
esde
machine-learning
MLAir
Commits
c6d4d753
Commit
c6d4d753
authored
5 years ago
by
lukas leufen
Browse files
Options
Downloads
Plain Diff
include refac
parents
dece8212
0fc741b2
No related branches found
No related tags found
1 merge request
!59
Develop
Pipeline
#31077
passed
5 years ago
Stage: test
Stage: pages
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/data_handling/bootstraps.py
+1
-1
1 addition, 1 deletion
src/data_handling/bootstraps.py
test/test_data_handling/test_bootstraps.py
+1
-1
1 addition, 1 deletion
test/test_data_handling/test_bootstraps.py
with
2 additions
and
2 deletions
src/data_handling/bootstraps.py
+
1
−
1
View file @
c6d4d753
...
@@ -176,7 +176,7 @@ class BootStraps(RunEnvironment):
...
@@ -176,7 +176,7 @@ class BootStraps(RunEnvironment):
return
False
,
max_nboot
return
False
,
max_nboot
@staticmethod
@staticmethod
def
shuffle_single_variable
(
data
:
da
.
array
,
chunks
)
->
np
.
nda
rray
:
def
shuffle_single_variable
(
data
:
da
.
array
,
chunks
)
->
da
.
core
.
A
rray
:
size
=
data
.
shape
size
=
data
.
shape
return
da
.
random
.
choice
(
data
.
reshape
(
-
1
,),
size
=
size
,
chunks
=
chunks
)
return
da
.
random
.
choice
(
data
.
reshape
(
-
1
,),
size
=
size
,
chunks
=
chunks
)
...
...
This diff is collapsed.
Click to expand it.
test/test_data_handling/test_bootstraps.py
+
1
−
1
View file @
c6d4d753
...
@@ -54,7 +54,7 @@ class TestBootstraps:
...
@@ -54,7 +54,7 @@ class TestBootstraps:
def
test_shuffle_single_variale
(
self
,
boot_no_init
):
def
test_shuffle_single_variale
(
self
,
boot_no_init
):
data
=
np
.
array
([[
1
,
2
,
3
],
[
1
,
2
,
3
],
[
1
,
2
,
3
],
[
1
,
2
,
3
]])
data
=
np
.
array
([[
1
,
2
,
3
],
[
1
,
2
,
3
],
[
1
,
2
,
3
],
[
1
,
2
,
3
]])
res
=
boot_no_init
.
shuffle_single_variable
(
data
)
res
=
boot_no_init
.
shuffle_single_variable
(
data
,
chunks
=
(
2
,
3
)).
compute
(
)
assert
res
.
shape
==
data
.
shape
assert
res
.
shape
==
data
.
shape
assert
res
.
max
()
==
data
.
max
()
assert
res
.
max
()
==
data
.
max
()
assert
res
.
min
()
==
data
.
min
()
assert
res
.
min
()
==
data
.
min
()
...
...
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