I have huge json objects containing 2D lists of coordinates that I need to transform into numpy arrays for processing.
However using json.loads followed wi
json.loads
The simplest answer would just be:
numpy_2d_arrays = np.array(dict["rings"])
As this avoids explicitly looping over your array in python you would probably see a modest speedup. If you have control over the creation of json_input it would be better to write out as a serial array. A version is here.
json_input