Skip to content

Cannot write LinSpace #16

Description

@mwil

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions