In Julia v0.5 the output type of the linspace() function has been changed to LinSpace, which is not a subtype of Array, but of AbstractArray. Because of this, it is not seamlessly possible to write the output of linspace() and similar functions.
> NPZ.npzwritearray("test.npz", linspace(1,2))
ERROR: MethodError: no method matching npzwritearray(::String, ::LinSpace{Float64})
It works when you explicitly convert it to Array, but wouldn't it be better to change the signature of npzwritearray() to accept AbstractArray?
In Julia v0.5 the output type of the
linspace()
function has been changed toLinSpace
, which is not a subtype ofArray
, but ofAbstractArray
. Because of this, it is not seamlessly possible to write the output oflinspace()
and similar functions.It works when you explicitly
convert
it toArray
, but wouldn't it be better to change the signature ofnpzwritearray()
to acceptAbstractArray
?