I think It should be possible to write all of the following:
T.array() // instantiates empty array of T (T[0])
T.array(W) // instantiates an array of length W
T.array([a, b, c]) // instantiates an array of length 1 with data from a, b, and c
I'm not sure about T.array(W, H). I originally wanted to support that, but I do not particularly want to support a multi-dimensional array example form. That seems to require that the full dimensions be specified, it cannot be (easily) inferred from the example itself, so I'd rather people write:
T.ArrayType(W, H)([[a, b, c], [d, e, f]])
Maybe it's nicer to just only have the one-dimensional versions of everything. So the previous example would become:
I think It should be possible to write all of the following:
I'm not sure about
T.array(W, H)
. I originally wanted to support that, but I do not particularly want to support a multi-dimensional array example form. That seems to require that the full dimensions be specified, it cannot be (easily) inferred from the example itself, so I'd rather people write:Maybe it's nicer to just only have the one-dimensional versions of everything. So the previous example would become: