Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lalsuite-archive
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
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
Oliver Behnke
lalsuite-archive
Commits
8cbd1b71
Commit
8cbd1b71
authored
7 years ago
by
Chris Pankow
Browse files
Options
Downloads
Patches
Plain Diff
rapidpe_cig: silence deprecation warnings
parent
3ba31708
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
lalinference/python/rapidpe_compute_intrinsic_grid.py
+3
-3
3 additions, 3 deletions
lalinference/python/rapidpe_compute_intrinsic_grid.py
with
3 additions
and
3 deletions
lalinference/python/rapidpe_compute_intrinsic_grid.py
+
3
−
3
View file @
8cbd1b71
...
@@ -90,7 +90,7 @@ def find_olap_index(tree, intr_prms, exact=True, **kwargs):
...
@@ -90,7 +90,7 @@ def find_olap_index(tree, intr_prms, exact=True, **kwargs):
pt
=
numpy
.
array
([
kwargs
[
k
]
for
k
in
intr_prms
])
pt
=
numpy
.
array
([
kwargs
[
k
]
for
k
in
intr_prms
])
# FIXME: Replace with standard function
# FIXME: Replace with standard function
dist
,
m_idx
=
tree
.
query
(
pt
,
k
=
1
)
dist
,
m_idx
=
tree
.
query
(
numpy
.
atleast_2d
(
pt
)
,
k
=
1
)
dist
,
m_idx
=
dist
[
0
][
0
],
int
(
m_idx
[
0
][
0
])
dist
,
m_idx
=
dist
[
0
][
0
],
int
(
m_idx
[
0
][
0
])
# FIXME: There's still some tolerance from floating point conversions
# FIXME: There's still some tolerance from floating point conversions
...
@@ -152,7 +152,7 @@ def get_evidence_grid(points, res_pts, intr_prms, exact=False):
...
@@ -152,7 +152,7 @@ def get_evidence_grid(points, res_pts, intr_prms, exact=False):
grid_idx
=
[]
grid_idx
=
[]
# Reorder the grid points to match their weight indices
# Reorder the grid points to match their weight indices
for
res
in
res_pts
:
for
res
in
res_pts
:
dist
,
idx
=
grid_tree
.
query
(
res
,
k
=
1
)
dist
,
idx
=
grid_tree
.
query
(
numpy
.
atleast_2d
(
res
)
,
k
=
1
)
# Stupid floating point inexactitude...
# Stupid floating point inexactitude...
#print res, selected[idx[0][0]]
#print res, selected[idx[0][0]]
#assert numpy.allclose(res, selected[idx[0][0]])
#assert numpy.allclose(res, selected[idx[0][0]])
...
@@ -363,7 +363,7 @@ else:
...
@@ -363,7 +363,7 @@ else:
if
opts
.
deactivate
:
if
opts
.
deactivate
:
get_idx
=
set
()
get_idx
=
set
()
for
pt
in
pts
[
idx
:]:
for
pt
in
pts
[
idx
:]:
get_idx
.
add
(
tree
.
query
(
pt
,
k
=
1
,
return_distance
=
False
)[
0
][
0
])
get_idx
.
add
(
tree
.
query
(
numpy
.
atleast_2d
(
pt
)
,
k
=
1
,
return_distance
=
False
)[
0
][
0
])
selected
=
grid
[
numpy
.
array
(
list
(
get_idx
))]
selected
=
grid
[
numpy
.
array
(
list
(
get_idx
))]
else
:
else
:
selected
=
grid
selected
=
grid
...
...
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