9951 explained code solutions for 126 technologies

python-numpyLoad Numpy array data from JSON

import numpy as np
import json as json

jsn = '[[1,2],[3,4]]'
a = np.array(json.loads(jsn))ctrl + c
import numpy as np

load Numpy module for Python

import json as json

load JSON module to parse JSON


create Numpy array from given list


sample JSON string to create Numpy array from


parse given JSON data to list