What is the Julia equivalent of the following Python and MATLAB codes?
I’m looking for identical formatting in the output.
After searching the documentation (e.g. JLD, CSV, DataFrames), I have not found a satisfactory answer, hence I’m asking here.
(MATLAB) Input:
p = [1 2]
q = [3 4]
save pqfile.txt p q -ascii -double
(MATLAB) Output:
1.0000000000000000e+00 2.0000000000000000e+00
3.0000000000000000e+00 4.0000000000000000e+00
(Python) Input:
import numpy as np
p = np.array([1, 2])
q = np.array([3, 4])
np.savetxt("pqfile.txt", [p, q], fmt='%.16e')
(Python) Output:
1.0000000000000000e+00 2.0000000000000000e+00
3.0000000000000000e+00 4.0000000000000000e+00