Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
NIFTy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ift
NIFTy
Commits
ce37ce7c
Commit
ce37ce7c
authored
Sep 28, 2016
by
Jait Dixit
Browse files
Options
Downloads
Patches
Plain Diff
Fix distance_array in HPSpace and GLSpace
parent
4ec189ad
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!30
Smooth operator
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
nifty/spaces/gl_space/gl_space.py
+3
-2
3 additions, 2 deletions
nifty/spaces/gl_space/gl_space.py
nifty/spaces/hp_space/hp_space.py
+3
-2
3 additions, 2 deletions
nifty/spaces/hp_space/hp_space.py
with
6 additions
and
4 deletions
nifty/spaces/gl_space/gl_space.py
+
3
−
2
View file @
ce37ce7c
...
@@ -155,12 +155,13 @@ class GLSpace(Space):
...
@@ -155,12 +155,13 @@ class GLSpace(Space):
def
distance_array
(
self
,
distribution_strategy
):
def
distance_array
(
self
,
distribution_strategy
):
dists
=
arange
(
dists
=
arange
(
start
=
0
,
stop
=
self
.
shape
[
0
],
dtype
=
np
.
float128
,
start
=
0
,
stop
=
self
.
shape
[
0
],
distribution_strategy
=
distribution_strategy
distribution_strategy
=
distribution_strategy
)
)
dists
=
dists
.
apply_scalar_function
(
dists
=
dists
.
apply_scalar_function
(
lambda
x
:
self
.
_distance_array_helper
(
divmod
(
int
(
x
),
self
.
nlon
))
lambda
x
:
self
.
_distance_array_helper
(
divmod
(
int
(
x
),
self
.
nlon
)),
dtype
=
np
.
float
)
)
return
dists
return
dists
...
...
...
...
This diff is collapsed.
Click to expand it.
nifty/spaces/hp_space/hp_space.py
+
3
−
2
View file @
ce37ce7c
...
@@ -172,7 +172,7 @@ class HPSpace(Space):
...
@@ -172,7 +172,7 @@ class HPSpace(Space):
dists: distributed_data_object
dists: distributed_data_object
"""
"""
dists
=
arange
(
dists
=
arange
(
start
=
0
,
stop
=
self
.
shape
[
0
],
dtype
=
np
.
float128
,
start
=
0
,
stop
=
self
.
shape
[
0
],
distribution_strategy
=
distribution_strategy
distribution_strategy
=
distribution_strategy
)
)
...
@@ -181,7 +181,8 @@ class HPSpace(Space):
...
@@ -181,7 +181,8 @@ class HPSpace(Space):
dists
=
dists
.
apply_scalar_function
(
dists
=
dists
.
apply_scalar_function
(
lambda
x
:
np
.
arccos
(
np
.
dot
(
hp
.
pix2vec
(
self
.
nside
,
int
(
x
)),
lambda
x
:
np
.
arccos
(
np
.
dot
(
hp
.
pix2vec
(
self
.
nside
,
int
(
x
)),
center_vec
))
center_vec
)),
dtype
=
np
.
float
)
)
return
dists
return
dists
...
...
...
...
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
sign in
to comment