Thank you all, that is what I thought, I will stick with plain Float64 for now.
-Júlio 2015-07-24 10:59 GMT-07:00 Erik Schnetter <[email protected]>: > On Fri, Jul 24, 2015 at 1:09 PM, Júlio Hoffimann < > [email protected]> wrote: > >> Hi, >> >> Is there any definition of NaN for Integer types? Let's say I want to >> create a matrix with some unspecified entries, that is entries marked >> special. I am using NaN for Float64 but would like to make it work with >> other types too. Suggestions? >> > > There is no pre-defined integer nan equivalent. > > Option 1 (fast but unsafe): Pick a special int value that is rarely used, > e.g. typemin(Int). > Option 2 (works with all types, including Float64, and is safer): Use a > nullable type. This might complicate your code and may slightly increase > your memory usage. > > -erik > > -- > Erik Schnetter <[email protected]> > http://www.perimeterinstitute.ca/personal/eschnetter/ >
