Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
GSRP TDOA
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
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
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
Maxence Ferrari
GSRP TDOA
Commits
564949c9
Commit
564949c9
authored
1 year ago
by
ferrari
Browse files
Options
Downloads
Patches
Plain Diff
Increase check for floating point errors
parent
47cc37bf
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
gsrp_smart_util.py
+5
-1
5 additions, 1 deletion
gsrp_smart_util.py
with
5 additions
and
1 deletion
gsrp_smart_util.py
+
5
−
1
View file @
564949c9
...
...
@@ -208,7 +208,11 @@ def smart_gsrp(cc, n_ind, n_tot, t_max, tree, program, clean_list, verbose=False
memory
[
k
]
=
mask_val
(
v
,
out_val
-
sum
(
m
for
tij
,
m
in
max_val
.
items
()
if
curr_tij
.
isdisjoint
(
tij
)))
if
i
and
np
.
prod
([
v
[
0
].
size
for
v
in
memory
.
values
()],
dtype
=
np
.
float64
)
<=
1024
:
# float to prevent overflow
try
:
return
*
add_all
(
memory
,
tree
,
cc
,
t_max
,
n_ind
,
n_tot
),
1
val
,
tij
=
add_all
(
memory
,
tree
,
cc
,
t_max
,
n_ind
,
n_tot
)
if
val
>
out_val
:
# is false is val == out_val, or if floating point error mask potential good results
return
cc
[
np
.
arange
(
n_tot
),
tij
].
sum
(),
tij
,
1
# recomputing to reduce floating point errors
else
:
return
out_val
,
tij
,
1
except
ValueError
as
e
:
if
any
(
v
[
0
].
size
==
0
for
v
in
memory
.
values
()):
# due floating point error
return
out_val
,
out_tij
,
1
# current tij should only contain maxima for this error to occur
...
...
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