Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
astro
astrotools
Commits
0a26231d
Commit
0a26231d
authored
Jan 23, 2020
by
Niklas Uwe Langner
Browse files
[simulations] Only shuffle vecs when it exists
parent
6f42437e
Pipeline
#232023
passed with stages
in 7 minutes and 16 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
astrotools/simulations.py
View file @
0a26231d
...
...
@@ -109,8 +109,10 @@ class BaseSimulation:
sets_ids
=
np
.
repeat
(
np
.
arange
(
self
.
nsets
),
self
.
ncrs
).
reshape
(
self
.
shape
)
for
_key
in
self
.
crs
.
shape_array
.
dtype
.
names
:
self
.
crs
[
_key
]
=
self
.
crs
[
_key
][
sets_ids
,
shuffle_ids
]
sets_ids_3d
=
np
.
repeat
(
np
.
arange
(
3
),
np
.
prod
(
self
.
shape
)).
reshape
((
3
,)
+
self
.
shape
)
self
.
crs
[
'vecs'
]
=
self
.
crs
[
'vecs'
][
sets_ids_3d
,
sets_ids
,
np
.
stack
([
shuffle_ids
]
*
3
)]
self
.
signal_label
=
self
.
signal_label
[
sets_ids
,
shuffle_ids
]
if
'vecs'
in
self
.
crs
.
keys
():
sets_ids_3d
=
np
.
repeat
(
np
.
arange
(
3
),
np
.
prod
(
self
.
shape
)).
reshape
((
3
,)
+
self
.
shape
)
Marcus Wirtz
@marcus.wirtz
·
Jan 23, 2020
Owner
This is strange
This is strange
Niklas Uwe Langner
@niklas.langner
·
Jan 23, 2020
Author
Owner
You are strange
You are strange
Marcus Wirtz
@marcus.wirtz
·
Jan 23, 2020
Owner
🤦
:face_palm:
Please
register
or
sign in
to reply
self
.
crs
[
'vecs'
]
=
self
.
crs
[
'vecs'
][
sets_ids_3d
,
sets_ids
,
np
.
stack
([
shuffle_ids
]
*
3
)]
class
ObservedBound
(
BaseSimulation
):
...
...
Marcus Wirtz
@marcus.wirtz
·
Jan 23, 2020
Owner
Best commit ever! <3
Best commit ever! <3
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