This looks like the most straightforward:
np.array(g).astype(np.float64)
If you skip the astype method, numpy will create a matrix of type ‘object’, which won’t work with common array operations.
This looks like the most straightforward:
np.array(g).astype(np.float64)
If you skip the astype method, numpy will create a matrix of type ‘object’, which won’t work with common array operations.