torch / tds

Torch C data structures
Other
80 stars 25 forks source link

vec: handle `nil` values in varargs (ctor) #10

Closed deltheil closed 8 years ago

deltheil commented 8 years ago

It was the case before commit 65cce40.

This fixes #8 (otherwise we can as well reject this PR and fix the README to deprecate such usage).

I also tweaked the README to pinpoint that holes in tables are NOT supported, e.g.:

tds.Vec{10, 20, nil 40} -- ko
tds.Vec(10, 20, {"foo", nil, "bar", "baz"}) -- ok but the inner table...
                                            -- is represented as a tds.Hash
soumith commented 8 years ago

cc: @andresy have a look at this and #9

andresy commented 8 years ago
andresy commented 8 years ago

see #11