This repository was archived by the owner on May 4, 2019. It is now read-only.
This repository was archived by the owner on May 4, 2019. It is now read-only.
Arithmetic operators on Nullable #111
Closed
Description
The line:
https://github.com/JuliaStats/NullableArrays.jl/blob/master/src/operators.jl#L37
has the following consequences:
a) types that are not bits throw error when operated on:
x = Nullable(1)
x+x # works
x = Nullable(BigInt(1))
x+x # error
This probably should be fixed.
b) operation on a missing of type that is not bits fails
x = Nullable(1.0)
y = Nullable()
x+y # error
x+convert(Nullable{Int64}, y) # works as addition of Int64 and Float64 is possible
I am not sure if this should be fixed. Implementation convert
for Nullable
implies that missing value of Nullable{T}
can be always converted to Nullable{S}
independent on what T
and S
are but I am not sure if this conversion should be automatically performed in operations on nullables.
Metadata
Metadata
Assignees
Labels
No labels