pixel-grid icon indicating copy to clipboard operation
pixel-grid copied to clipboard

add option to force type inference

Open freeman-lab opened this issue 8 years ago • 0 comments

Because we handle both flat arrays and nested arrays, and both single float values and rgb triplets, there is an unavoidable ambiguity when passing something like

[[a,b,c],[a,b,c],[a,b,c],[a,b,c]]

Is that a 4x3 grid of numbers, or a 4x1 grid of rgb values?

A simple solution is to add a type option that, if provided, forces one form of type inference or the other, then it matter's less which we do by default (currently, treat them as rgb).

freeman-lab avatar Aug 18 '16 15:08 freeman-lab