.npy files can contain structured arrays, as described here, fail to open with error:
Uncaught SyntaxError: Unexpected token ( in JSON at position 28
Example, in python create the structured array:
np.save('test/out.npy', np.array([('Rex', 9, 81.0), ('Fido', 3, 27.0)],
dtype=[('name', 'U10'), ('age', 'i4'), ('weight', 'f4')]))
Serve the out.npy file:
Try to load that out.npy file:
> np.load("http://localhost:3000/out.npy")
Promise {
<pending>,
[Symbol(async_id_symbol)]: 4454,
[Symbol(trigger_async_id_symbol)]: 5
}
> Uncaught SyntaxError: Unexpected token ( in JSON at position 28
.npyfiles can contain structured arrays, as described here, fail to open with error:Example, in python create the structured array:
Serve the
out.npyfile:Try to load that
out.npyfile: