-
-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
Box space with different datatypes are compared to be equal if range is same.
MWE:
julia> box1 = Box(0, 255, (1,), Float32)
Box(Float32[0.0], Float32[255.0], (1,), Float32)
julia> box2 = Box(0, 255, (1,), UInt8)
Box(UInt8[0x00], UInt8[0xff], (1,), UInt8)
julia> sample(box1)
1-element Array{Float32,1}:
168.51285
julia> sample(box2)
1-element Array{UInt8,1}:
0x7d
julia> box1 == box2
true # <--- This should be false!!
Maybe we should make Box(0, 255, (1,), UInt8) != Box(0, 255, (1,), UInt16) and Box(0, 255, (1,), UInt8) != Box(0, 255, (1,), Int8) as the return data type may cause typeistability down the line.
Metadata
Metadata
Assignees
Labels
No labels