Reputation: 353
I am loading data from a JSON file as list and then making a NumPy array.
The JSON file is structured as follows
{
"label": "4",
"mfcc": [
[
[
-147.2358550730904,
52.60503152410914,
<more values Total=13>
],
<more arrays Total=44>
The code I am using to make a NumPy array using data collected from the JSON file
with open("data.json", 'r') as file:
data = json.load(file)
mfcc = np.array(data["mfcc"])
It seems that the most outer list gets converted to a NumPy array while the inner lists are still lists. See the image below:
What has happened?
Thanks in advance!
Upvotes: 2
Views: 944
Reputation: 8240
So it means the file contains a numpy array with lists inside.
0
for instance)Upvotes: 1