deck.gl icon indicating copy to clipboard operation
deck.gl copied to clipboard

[Feat] [pydeck] Convert numpy arrays to lists during JSON serialization

Open dakoop opened this issue 3 years ago • 1 comments

Target Use Case

I've passed numpy arrays to pydeck many times, often in the context of a PathLayer, and run into the object has no vars error. After recalling what this means, I go figure out where the issue is and make sure everything ends up as lists. This would shortcut that issue, and help others not get lost trying to decode the error message.

Proposal

Just a couple of lines and a numpy import:

https://github.com/dakoop/deck.gl/commit/f8dd1ef4aaab09bdb9e39b619b42c4210426ae5e

dakoop avatar Apr 22 '22 21:04 dakoop

I'm running into this issue to. Would be nice if pydeck did it under the hood! The 'object has no vars' error is quite unclear it's taken me a while to figure out what's going on..

RmStorm avatar Jun 27 '23 09:06 RmStorm