Julia Programming Language
Unique() to a certain tolerance?
General Usage
faq
phelipe
April 10, 2019, 4:48pm
2
You can use “trunc”:
data = rand(10) unique(trunc.(data, digits = 4))
1 Like
show post in topic
Related topics
Topic
Replies
Views
Activity
How to make a Set of real values based on rtol?
General Usage
question
2
896
August 6, 2018
Possible bug in unique/Set
Internals & Design
faq
49
4551
June 15, 2018
The test isequal(+0.0,-0.0) returns FALSE
Numerics
isequal
16
990
June 2, 2020
Is it safe to compare rounded float values for equality?
General Usage
faq
11
9246
February 28, 2019
Questions related to -0.0 and 0.0
General Usage
question
9
544
October 21, 2021